On Wed, Oct 28, 2009 at 10:27 AM, Mario Ruggier <[email protected]> wrote: > > On Tue, Oct 27, 2009 at 9:27 PM, Mike Orr <[email protected]> wrote: >> >> On Tue, Oct 27, 2009 at 4:07 AM, Mario Ruggier <[email protected]> wrote: >>> No-one seems to give any consideration to the very real possibility of >>> adjusting the *same* code base to run on both py 2 *and* 3 -- the same >>> tarball, the same setup.py. A recipe (and real world examples, one of >>> which is a web fraemwork) for how this may be done is here: >>> http://mail.mems-exchange.org/durusmail/qp/441/ >> >> That would work in the short term, but it would suck to be limited to >> a subset of Python's features, and to have 'if's all over the place. > > There need only be one if block, centrally placed... all modules can > import specific items from there. > >> In the long term it would seem even more restraining, although >> presumably you could abandon the policy in a year or two. > > Well, yes, that's the price to pay for having a unique code base (and > dist package). In any case, you would still gain on other py3 > features, like performance, when running under py3.
Has Python 3's performance caught up to Python 2's yet? For a while the I/O system was in Python though I think it's in C now, but the last stats I saw showed Python 3 running slower. > But, name me *one* > py3 feature for which a legacy package *must* have ?!? You can say the same about Python 2.6 features, Python 2.5 features, etc. You don't *have* to use them and some people don't care, but other people do and would like to use the features. For instance, named tuples and defaultdict, which were added in 2.6. I had to reimplement defaultdict in WebHelpers so it would be compatible with 2.5. I still haven't used named tuples yet because we only switched to Python 2.6 at work a few months ago. -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
