Re: [Python-Dev] Floor division

2007-01-22 Thread Tim Peters
[Guido] >> The ints aren't really embedded in Decimal, so we don't have to do >> that there (but we could). [Facundo Batista] > -0. > > If we can't achieve it without disturbing the rest of Python, I'll try > as much as possible to keep what the Spec proposes. Which "Spec"? For example, floor di

Re: [Python-Dev] Floor division

2007-01-22 Thread Tim Peters
[Guido] >> That really sucks, especially since the whole point of making int >> division return a float was to make the integers embedded in the >> floats... I think the best solution would be to remove the definition >> of % (and then also for divmod()) for floats altogether, deferring to >> math.

Re: [Python-Dev] Floor division

2007-01-22 Thread Tim Peters
[Guido] > ... > So you are proposing that Decimal also rip out the % and // operators > and __divmod__? WFM, but I don't know what Decimal users say (I'm not > one). Yes: it's just as much a floating type as HW binary floats, and all the same issues come up. For example, decimal floats are just

Re: [Python-Dev] Eliminating f_tstate

2007-01-22 Thread Delaney, Timothy (Tim)
"Martin v. Löwis" wrote: > For Python 2.5, for compatibility, it probably has to remain > where it is, and only PyTraceBack_Here should stop using it. > As a consequence, a generator .send() makes exceptions > occur in the current thread, not in the thread where the > generator was created. > > W

Re: [Python-Dev] Floor division

2007-01-22 Thread Facundo Batista
Guido van Rossum wrote: > The ints aren't really embedded in Decimal, so we don't have to do > that there (but we could). -0. If we can't achieve it without disturbing the rest of Python, I'll try as much as possible to keep what the Spec proposes. Regards, -- . Facundo . Blog: http://www.t

Re: [Python-Dev] [Python-checkins] buildbot failure in amd64 gentoo 2.5

2007-01-22 Thread Martin v. Löwis
Georg Brandl schrieb: > Do I miss something here, or is the buildbot hit by spammers now? It looks like it is. If that continues, we have to disable the web triggers. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.o

Re: [Python-Dev] Floor division

2007-01-22 Thread Nick Maclaren
"Guido van Rossum" <[EMAIL PROTECTED]> wrote: > > That really sucks, especially since the whole point of making int > division return a float was to make the integers embedded in the > floats... I think the best solution would be to remove the definition > of % (and then also for divmod())

Re: [Python-Dev] Eliminating f_tstate

2007-01-22 Thread Brett Cannon
On 1/22/07, Michael Hudson <[EMAIL PROTECTED]> wrote: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: > > > 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 hav

Re: [Python-Dev] Floor division

2007-01-22 Thread Guido van Rossum
On 1/21/07, Tim Peters <[EMAIL PROTECTED]> wrote: > [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

Re: [Python-Dev] Eliminating f_tstate

2007-01-22 Thread Michael Hudson
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > 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 pla