Guido van Rossum wrote: > Oh, you won't. Just don't use the -3 command-line flag and don't put > "from __future__ import <whatever>" at the top of your modules, and > you won't have to change your ways at all. You can continue to > distribute your packages in 2.5 syntax that will also work with 2.6, > and your users will be happy (as long as they don't want to use your > code on 3.0 -- but if you want to give them that, *that* is when you > will finally be forced to face the issue. :-)
from __future__ import bytes ? What should the __future__ statement change? * "" returns unicode instead of str * b"" is allowed and returns bytes (a new subclass of str) * u"" is still allowed and returns unicode, too. * The str built-in is not available. > Note that I believe that the -3 flag should not change semantics -- it > should only add warnings. Semantic changes must either be backwards > compatible or be requested explicitly with a __forward__ import (which > 2to3 can remove). Agreed! Should the -3 flag also warn about deprecated features which can easily migrated with 2to3? In the past a warning for `` (back ticks) were added. The feature is deprecated but the migration is very simple. A 2to26 fixer may be worth implementing, too. It could migrate minor changes like `` -> repr and "except egg, spam" -> "except egg as spam". Christian _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com