News for hackers. Stuff that matters.
Re:Code that will break in Python 4 by verbatim on Tuesday January 12, 2016 @03:12PM (#10890000)
Pick a Python 3 feature and let us know how you would implement it in Python 2.
Re:Code that will break in Python 4 by Grue3 on Tuesday January 12, 2016 @04:52PM (#10890703)
Easy.

Feature: print function.

Implementation: from __future__ import print_function

Yes, that magical, backwards-incompatible, print function has been in Python 2 all along!

Feature: unicode strings

Implementation: from __future__ import unicode_literals

Amazing! The magical, backwards-incompatible unicode strings backported to Python 2 with one single line.

I could go on and on.

Re:Code that will break in Python 4 by orf on Tuesday January 12, 2016 @06:05PM (#10891113)
> Amazing! The magical, backwards-incompatible unicode strings backported to Python 2 with one single line.

Except it's not even slightly close to that is it. unicode_literals is something completely different.

How about removing old style classes? Is `class x:` old style or new style in Python 2, in this imaginary interpreter of yours? How about the default object comparison being sane in Python 3. How about the changes to builtins returning iterables over lists? How about the import system being more sane? How about removing backticks? How about actually handling the unicode differences?

I could go on and on, and I hope your answer is not 'well we just need more __future__ imports don't we'.