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

2007-01-21 Thread Phillip J. Eby
At 01:17 PM 1/20/2007, 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 would >either all

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

2007-01-21 Thread Josiah Carlson
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > > At 01:17 PM 1/20/2007, 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 go

Re: [Python-Dev] Floor division

2007-01-21 Thread Tim Peters
[Tim Peters] >> ... >> >>> decimal.Decimal(-1) % decimal.Decimal("1e100") >> Decimal("-1") [Armin Rigo] > 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? Sure. > We try hard to do that for

Re: [Python-Dev] Floor division

2007-01-21 Thread Guido van Rossum
On 1/21/07, Tim Peters <[EMAIL PROTECTED]> wrote: > It's just a fact that different definitions of mod are most useful > most often depending on data type. Python's is good for integers and > often sucks for floats. The C99 and `decimal` definition(s) is/are > good for floats and often suck(s) fo

Re: [Python-Dev] Floor division

2007-01-21 Thread Tim Peters
... [Tim] >> It's just a fact that different definitions of mod are most useful >> most often depending on data type. Python's is good for integers and >> often sucks for floats. The C99 and `decimal` definition(s) is/are >> good for floats and often suck(s) for integers. Trying to pretend >> t

[Python-Dev] Eliminating f_tstate

2007-01-21 Thread Martin v. Löwis
Bug #1579370 reports a crash when accessing the thread state of a terminated thread, when releasing a generator object. In analysing the problem, I found that f_tstate doesn't have much utility: it is used in very few places, and in these places, it might be as good or better to use the *current*