Re: [Python-Dev] 2to3 status, repositories and HACKING guide
Is there any high-level overview of 2to3 tool that people can use as a quick start for writing their own fixers? Source doesn't explain much (to me at least), and some kind of learn by example would really help a lot. In particular, I find the syntax of tree matchers the most unclear part. -- anatoly t. On Fri, Mar 25, 2011 at 9:12 PM, Benjamin Peterson benja...@python.org wrote: The main cpython repo. 2011/3/25 anatoly techtonik techto...@gmail.com: Hi, Benjamin, Is your repository for 2to3 is still actual? http://svn.python.org/view/sandbox/trunk/2to3/ Which should I use to start hacking on 2to3? -- anatoly t. On Wed, Mar 23, 2011 at 9:01 AM, anatoly techtonik techto...@gmail.com wrote: Hi, Currently 2to3 page at http://wiki.python.org/moin/2to3 lists http://svn.python.org/view/sandbox/trunk/2to3 as a repository for 2to3 tool. There is also an outdated repository at http://hg.python.org/ and the page says that the code is finally integrated into CPython 2.6 - you can see it at http://hg.python.org/cpython/file/default/Lib/lib2to3. So, what version is more up-to-date? In svn repository there is a HACKING guide advising to use find_pattern.py script for writing new fixer. However, there is no find_pattern.py in CPython repository, no HACKING guide, no any documentation about how to write fixers or description of PATTERN format. Did I miss something? -- anatoly t. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Not-a-Number (was PyObject_RichCompareBool identity shortcut)
On Sat, Apr 30, 2011 at 3:11 AM, Guido van Rossum gu...@python.org wrote: Decimal, for that reason, has a context that lets one specify different behaviors when a NaN is produced. Would it make sense to add a float context that also lets one specify what should happen? That could include returning Inf for 1.0/0.0 (for experts), or raising exceptions when NaNs are produced (for the numerically naive like myself). I could see a downside too, e.g. the correctness of code that passingly uses floats might be affected by the context settings. There's also the question of whether the float context should affect int operations; floats vs. ints is another can of worms since (in Python 3) we attempt to tie them together through 1/2 == 0.5, but ints have a much larger range than floats. Given that we delegate most float() behaviour to the underlying CPU and C libraries (and then the math module tries to cope with any cross-platform discrepancies), introducing context handling isn't easy, and would likely harm the current speed advantage that floats hold over the decimal module. We decided that losing the speed advantage of native integers was worthwhile in order to better unify the semantics of int and long for Py3k, but both the speed differential and the semantic gap between float() and decimal.Decimal() are significantly larger. However, I did find Terry's suggestion of using the warnings module to report some of the floating point corner cases that currently silently produce unexpected results to be an interesting one. If those operations issued a FloatWarning, then users could either silence them or turn them into errors as desired. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2to3 status, repositories and HACKING guide
2011/5/1 anatoly techtonik techto...@gmail.com: Is there any high-level overview of 2to3 tool that people can use as a quick start for writing their own fixers? No. Source doesn't explain much (to me at least), and some kind of learn by example would really help a lot. In particular, I find the syntax of tree matchers the most unclear part. I think you can learn a lot by reading through the current fixers in lib2to3/fixers/. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Issue Tracker
On 30.04.2011 16:53, anatoly techtonik wrote: On Tue, Mar 29, 2011 at 4:37 AM, R. David Murray rdmur...@bitdance.com wrote: The hardest part is debugging the TAL when you make a mistake, but even that isn't a whole lot worse than any other templating language. How much in % is it worse than Django templating language? I'm just guessing here, but I'd say 47.256 %. Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Python 3.2.1
Hi, I'd like to release Python 3.2.1 on May 21, with a release candidate on May 14. Please bring any issues you think need to be fixed in it to my attention by assigning release blocker status in the tracker. Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 3.2.1
On May 1, 2011, at 10:57 AM, Georg Brandl wrote: I'd like to release Python 3.2.1 on May 21, with a release candidate on May 14. Please bring any issues you think need to be fixed in it to my attention by assigning release blocker status in the tracker. Thanks to http://www.python.org/dev/daily-dmg/ , I've been able to work off of the head every day. Python 3.2.1 is in pretty good shape :-) Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Not-a-Number (was PyObject_RichCompareBool identity shortcut)
On 5/1/2011 7:27 AM, Nick Coghlan wrote: However, I did find Terry's suggestion of using the warnings module to report some of the floating point corner cases that currently silently produce unexpected results to be an interesting one. If those operations issued a FloatWarning, then users could either silence them or turn them into errors as desired. I would like to take credit for that, but I was actually seconding Alexander's insight and idea. I may have added the specific name after looking at the currently list and seeing UnicodeWarning and BytesWarning, so why not a FloatWarning. I did read the warnings doc more carefully to verify that it would really put the user in control, which was apparently the intent of the committee. I am not sure whether FloatWarnings should ignored or printed by default. Ignored would, I guess, match current behavior, unless something else is changed as part of a more extensive overhaul. -f and -ff are available to turn ignored FloatWarning into print or raise exception, as with BytesWarning. I suspect that these would get at lease as much usage as -b and -bb. So I see 4 questions: 1. Add FloatWarning? 2. If yes, default disposition? 3. Add command line options? 4. Use the addition of FloatWarning as an opportunity to change other defaults, given that user will have more options? -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Windows 2000 Support
I'm currently writing a post about the process of removing OS/2 and VMS support and thought about a discussion of Windows 2000 some time back. http://mail.python.org/pipermail/python-dev/2010-March/098074.html makes a proposal for beginning to walk away from 2000, but doesn't appear to come to any conclusion. Was anything decided off the list? I don't see anything in PEP-11 and don't see any changes in the installer made around Windows 2000. If nothing was decided, should anything be done for 3.3? ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com