Tony Meyer wrote: > Hi Skip! > > [Skip] >>> After the next SpamBayes release I plan to branch the code and work on >>> porting it to Python 3.0, mostly as an experiment in porting code from >>> Python 2.x to 3.x whose results I can feed back to the larger Python >>> community. > > Cool :) > >>> I'm curious about how best to approach the problem. > > It's a guess, but I think SpamBayes supporting Python 2.2 will cause > issues with this. I'm sure that it'll be possible to create code that > works (when 2to3'd) with Python 2.6 and Python 3.0 - maybe even 2.5 or > 2.4 as well. However, having a single version (plus 2to3'd copy) that > works with 2.2, 2.3, 2.4, 2.5, 2.6 and 3.0 seems to be asking for a > lot.
Hmm, I wonder if a 2to3 fixer could be developed to drop dead portions of version checks like "if sys.version_info < (2, 5):" since it knows version_info will also be at least (3, 0) for the produced code. It seems like that would be a fairly powerful means of including "2.x only" code and have it automatically removed in the conversion to 3.0 (e.g. by using a condition like "if sys.version_info < (3, 0):" to mark the 2.x specific code). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com