On Fri, May 25, 2012 at 11:31 AM, Aaron Meurer <[email protected]> wrote: > On Fri, May 25, 2012 at 1:25 AM, Joachim Durchholz <[email protected]> wrote: >> Am 25.05.2012 05:22, schrieb Aaron Meurer: >> >>>> I meant functools. They have several new functions that make it easier to >>>> work with parameter lists. >>> >>> >>> Which ones specifically do you want to use, and what for? >> >> >> Ah, I have discontinued work on that one, due to other factors, so I'd have >> to dig the details up. It's just one example of the many things listed on >> http://docs.python.org/whatsnew/2.6.html . >> Heh. I even got the module name wrong, it wasn't functools, it was inspect. >> I used getargspec (I think). Then I found out these functions are >> unavailable in 2.5 and that I had to use a lower-level API from inspect and >> had to rewrite the entire error handling code path (which was a bit large >> even before that). >> >> >>>> 100%. It's just another option to be 3-compatible. >>>> Might help in those cases where 2to3 gives us grief (this tends to crop >>>> up >>>> in the mailing list occasionally). >>> >>> >>> The main addition of Python 2.6 was the 2to3 conversion tool, which we >>> use. But actually it doesn't matter what version has it, because we >>> only use it for development, not at run time (and indeed, it's better >>> to use the version of 2to3 from Python 3.2 if you can). >> >> >> In that case, 2to3 is an even less preferrable alternative than I thought. >> >> I guess the workflow document needs a section on Python version anyway. It >> should be mentioned that 2to3 cannot be run from a 2.5 environment. >> Seems that best practice is: >> - develop in 2.6 or 2.7 >> - if you test 3.x: >> - run 2to3 in 3.2 (is the 2.7 2to3 better than the 3.1 one?) > > I don't remember the details, but I think the Python 3 one is faster > and the Python 2.6 one has some bugs that due to Python's silly bug > fix policy will not be fixed. I could have some of those facts wrong, > though.
You are correct - the 2.6 version would drop into infinite loops in some cases, and the 3.2 version is much faster. IMHO, there's really no point in running 2to3 from either 2.6 or 2.7 - if you need py3k code, that means you have a Python 3 interpreter available, so might as well use the 2to3 from it. > > You shouldn't have to worry about it, though, because if you run > ./bin/use2to3 that uses Python 3, thanks to the shebang line. > -- Vladimir Perić -- You received this message because you are subscribed to the Google Groups "sympy" 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/sympy?hl=en.
