[Python-Dev] r62342 - python/branches/py3k/Objects/bytesobject.c
nnorwitz at gmail.com
Tue Apr 15 07:06:51 CEST 2008
On Mon, Apr 14, 2008 at 2:56 PM, Christian Heimes <lists at cheimes.de> 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__
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
More information about the Python-Dev