Re: [Python-Dev] Py_CLEAR to avoid crashes

2008-02-17 Thread Greg Ewing
Martin v. Löwis wrote: > when some caller of PyEval_EvalFrameEx still carries > a pointer to some object that got deleted, and then still some code can > get hold of the then-deleted object. I seem to have missed the beginning of this discussion. I don't see what the problem is here. If a caller n

Re: [Python-Dev] Py_CLEAR to avoid crashes

2008-02-17 Thread Martin v. Löwis
Jeffrey Yasskin wrote: > On Feb 16, 2008 3:12 PM, Amaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: >> Should we however intensively search and correct all of them? >> Is there a clever way to prevent these problems globally, for example >> by delaying finalizers "just a little"? > > A simple way to

Re: [Python-Dev] Use Python 3.0 syntax for except and raise?

2008-02-17 Thread Mark Dickinson
On Feb 17, 2:42 pm, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > There are some modules like Decimal that make a promise to run on earlier > versions of Python.  In those cases only the first change (backwards > compatible) > should be made.  Our 5,000 line Decimal package will need to wait fo

Re: [Python-Dev] Use Python 3.0 syntax for except and raise?

2008-02-17 Thread Mark Dickinson
On Feb 17, 2008 2:42 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > There are some modules like Decimal that make a promise to run on earlier > versions of Python. In those cases only the first change (backwards > compatible) > should be made. Our 5,000 line Decimal package will need to wait

Re: [Python-Dev] Use Python 3.0 syntax for except and raise?

2008-02-17 Thread Raymond Hettinger
[Christian Heimes] > I like to run the 2to3 tool with raise and except fixers over the 2.6 > sources. The raise fixer changes "raise Exception, msg" to "raise > Exception(msg)" and the except fixer replaces "except Exception, err" by > "except Exception as err". +1 The new syntax so much better t

Re: [Python-Dev] Use Python 3.0 syntax for except and raise?

2008-02-17 Thread Georg Brandl
Christian Heimes schrieb: > Good evening everybody! > > I like to run the 2to3 tool with raise and except fixers over the 2.6 > sources. The raise fixer changes "raise Exception, msg" to "raise > Exception(msg)" and the except fixer replaces "except Exception, err" by > "except Exception as err".

Re: [Python-Dev] Py_CLEAR to avoid crashes

2008-02-17 Thread Jeffrey Yasskin
On Feb 16, 2008 3:12 PM, Amaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: > Should we however intensively search and correct all of them? > Is there a clever way to prevent these problems globally, for example > by delaying finalizers "just a little"? A simple way to do this would be to push object

Re: [Python-Dev] trunk-math

2008-02-17 Thread Mark Dickinson
Aargh. Extra long lines again. Here's a repost. An update: after some discussion, we're planning a PEP for the "with ieee754" and related ideas, perhaps aimed at Python 3.1; there are lots of difficult decisions to be made, and plenty that would benefit from community feedback. In the meantim

Re: [Python-Dev] Use Python 3.0 syntax for except and raise?

2008-02-17 Thread Jeffrey Yasskin
Sounds good to me. Along those lines, shall we work on fixing warnings that -3 raises in the regression test suite? On Feb 17, 2008 8:57 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Good evening everybody! > > I like to run the 2to3 tool with raise and except fixers over the 2.6 > sources. Th

Re: [Python-Dev] trunk-math

2008-02-17 Thread Mark Dickinson
An update: after some discussion, we're planning a PEP for the "with ieee754" and related ideas, perhaps aimed at Python 3.1; there are lots of difficult decisions to be made, and plenty that would benefit from community feedback. In the meantime, we'll get the rest of the fixes/additions tidied

[Python-Dev] Use Python 3.0 syntax for except and raise?

2008-02-17 Thread Christian Heimes
Good evening everybody! I like to run the 2to3 tool with raise and except fixers over the 2.6 sources. The raise fixer changes "raise Exception, msg" to "raise Exception(msg)" and the except fixer replaces "except Exception, err" by "except Exception as err". In my humble opinion the Python stdlib

Re: [Python-Dev] Backporting PEP 3101 to 2.6

2008-02-17 Thread André Malo
* Eric Smith wrote: > André Malo wrote: > > I guess, a clean and complete solution (besides re-implementing the > > whole thing) would be to resolve each single format character with > > strftime, decode according to the locale and re-assemble the result > > string piece by piece. Doh! > > That's