On Mon, Apr 14, 2008 at 2:56 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Good idea! A 3to2 project is going to make backporting io.py and other > new stuff less painful and much faster. For the io.py backport I spent > most time on removing annotations and replacing "" with u"". > > What needs to be done? > > * remove funtion annotation > > * Add object to all empty class definition > > * replace class Egg(metaclass=Spam) with class > Egg(object):\n__metaclass__ = Spam > > * Add __future__ imports for print_function and unicode literals > > Anything else?
Iteration with the dict methods (e.g., keys -> iterkeys()), map/zip/filter returning iterator rather than list. int -> (int, long) str -> basestring or (str, unicode) __bool__ -> __nonzero__ exec/execfile input -> rawinput Most things that have a fixer in 2to3 would also require one in 3to2. Only things that work in backwards compatible ways like apply/has_key removal, etc don't need a 3to2 fixer. Although most of these 3to2 fixers are probably pretty low priority as they are not real likely to be used in the python code base. They are still needed for general user code. n _______________________________________________ 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