[Python-3000] Strategy for porting to 3.0?
Christian Heimes
lists at cheimes.de
Wed Mar 19 22:59:08 CET 2008
Eric Smith schrieb:
> For example, say that 2to3 changes all instances of has_key to an "in"
> expression (I'm not saying it does this or not, I really don't know).
> If you have a Locksmith class that has a has_key method unrelated to
> dicts, then 2to3 would break it. But it's certainly possible that you
> could change the method name in your 2.6 code and avoid the problem.
> You'd have 2.6 code that could automatically run in 3.0.
IIRC Collin is working on a system to skip those with a comment like
#2to3: skip fixer_haskey
if egg.has_key(spam):
Christian
More information about the Python-3000
mailing list