Re: [Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Anthony Baxter
On Sunday 21 January 2007 05:17, Josiah Carlson wrote: > Neal Becker <[EMAIL PROTECTED]> wrote: > [snip] > > > It's not a question, it's a critique. I believe this is a > > misfeature since it's so easy to make this mistake. > > And it is going away with Py3k. Making it go away for Python 2.6 > w

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-20 Thread Brett Cannon
On 1/20/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2007-01-20 00:01, Brett Cannon wrote: > > On 1/19/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > >> On 2007-01-19 22:33, Brett Cannon wrote: > That's a typical error situation you get in __del__ methods at > the time the interprete

Re: [Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Josiah Carlson
Neal Becker <[EMAIL PROTECTED]> wrote: [snip] > It's not a question, it's a critique. I believe this is a misfeature since > it's so easy to make this mistake. And it is going away with Py3k. Making it go away for Python 2.6 would either allow for two syntaxes to do the same thing, or would req

Re: [Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Neal Becker
Georg Brandl wrote: > Neal Becker schrieb: >> I accidentally wrote: >> >> try: >> ... >> except a,b: >> >> rather than: >> >> try >> ... >> except (a,b): >> >> It appears that the 1st example syntax is silently accepted, but doesn't >> seem to work. Is this true? If so, I'd say it's a wart

Re: [Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Georg Brandl
Neal Becker schrieb: > I accidentally wrote: > > try: > ... > except a,b: > > rather than: > > try > ... > except (a,b): > > It appears that the 1st example syntax is silently accepted, but doesn't > seem to work. Is this true? If so, I'd say it's a wart. Both have a meaning: The first ass

[Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Neal Becker
I accidentally wrote: try: ... except a,b: rather than: try ... except (a,b): It appears that the 1st example syntax is silently accepted, but doesn't seem to work. Is this true? If so, I'd say it's a wart. ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-20 Thread M.-A. Lemburg
On 2007-01-20 00:01, Brett Cannon wrote: > On 1/19/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: >> On 2007-01-19 22:33, Brett Cannon wrote: That's a typical error situation you get in __del__ methods at the time the interpreter is shut down. >>> Yeah, but in this case this is at the

Re: [Python-Dev] Floor division

2007-01-20 Thread Armin Rigo
Hi Tim, On Fri, Jan 19, 2007 at 08:33:23PM -0500, Tim Peters wrote: > >>> decimal.Decimal(-1) % decimal.Decimal("1e100") > Decimal("-1") BTW - isn't that case in contradiction with the general Python rule that if b > 0, then a % b should return a number between 0 included and b excluded? We try