Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Guido van Rossum
Then I see pyvm dwindling to near-zero size, since nearly all the types considered here are seen as official APIs by Jython, IronPython and PyPy. Also, if it's VM-specific perhaps it ought to have a VM-specific name. Personally, I think they should all move into existing modules -- many will fit

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Greg Ewing
Terry Reedy wrote: > "Christian Heimes" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > | I've started to work on a pyvm module patch today. Is there a clear rationale for the dividing line between sys and pyvm? Maybe the distinction should be that pyvm is for things that could

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Brett Cannon
On Nov 30, 2007 9:37 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Nov 30, 2007 8:08 AM, Mark Summerfield <[EMAIL PROTECTED]> wrote: > > Your reply seems to imply that Python 3 will have 3 different and > > overlapping ways of formatting strings: %, str.format(), and > > string.Template. If

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Eric Smith
Christian Heimes wrote: > Eric Smith wrote: >> And backporting __format__ and friends back to trunk is on my pending >> list. The fact that upgrading to Leopard broke my compilation >> environment isn't helping me out, unfortunately. > > I've seen several bugs related to Mac OS X 10.5 in the bu

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Fred Drake
On Nov 30, 2007, at 12:37 PM, Guido van Rossum wrote: > IMO string.Template is a dead experiment. Ouch. I like it. I use it. I hope it doesn't disappear. I'd be fine if it moved, and it should be easy enough to separate into a separate package distribution (which would be fine for my purpose

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Mark Summerfield
On 2007-11-30, Guido van Rossum wrote: > On Nov 30, 2007 8:08 AM, Mark Summerfield <[EMAIL PROTECTED]> wrote: > > Your reply seems to imply that Python 3 will have 3 different and > > overlapping ways of formatting strings: %, str.format(), and > > string.Template. If that is the case, it seems lik

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Phillip J. Eby
At 04:52 PM 11/30/2007 +, Paul Moore wrote: >On 30/11/2007, Barry Warsaw <[EMAIL PROTECTED]> wrote: > > >> class Example: > > >>implements(IExample) > > > > This frame hacking is also a pretty common feature of other types of > > systems, such as ORMs. It can make certain Python code much

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Guido van Rossum
On Nov 30, 2007 8:08 AM, Mark Summerfield <[EMAIL PROTECTED]> wrote: > Your reply seems to imply that Python 3 will have 3 different and > overlapping ways of formatting strings: %, str.format(), and > string.Template. If that is the case, it seems like overkill to me:-) IMO string.Template is a d

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Ivan Krstić
On Nov 30, 2007, at 2:52 PM, Paul Moore wrote: > one of the arguments for class decorators was that they are a way to > avoid the need for some of this getframe hacking, though. IIRC, the zope.interface clusterfrack was _the_ argument that got Guido to give thought to class decorators, after

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Guido van Rossum
On Nov 30, 2007 1:58 AM, Dirkjan Ochtman <[EMAIL PROTECTED]> wrote: > I was talking to the guys in #pypy (and I think some people from twisted > were agreeing), who said that the whole _frame thing is not really an > implementation detail, but a rather important interface. As such, I was > thinking

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Paul Moore
On 30/11/2007, Barry Warsaw <[EMAIL PROTECTED]> wrote: > >> class Example: > >>implements(IExample) > > This frame hacking is also a pretty common feature of other types of > systems, such as ORMs. It can make certain Python code much more > readable, so "frame hacking" is clearly a useful fea

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Christian Heimes
Eric Smith wrote: > And backporting __format__ and friends back to trunk is on my pending > list. The fact that upgrading to Leopard broke my compilation > environment isn't helping me out, unfortunately. I've seen several bugs related to Mac OS X 10.5 in the bug tracker. Could you test some pa

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Eric Smith
Mark Summerfield wrote: > Hi, > > I'm using Python 30a. > > The docs for str.format()'s 'g' format say > "General format. This prints the number as a fixed-point number, > unless the number is too large, in which case it switches to 'e' > exponent notation." > The fixed-point format u

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Mark Summerfield
On 2007-11-30, Eric Smith wrote: > Mark Summerfield wrote: > > Hi, > > > > I'm using Python 30a. > > > > The docs for str.format()'s 'g' format say > > "General format. This prints the number as a fixed-point number, > > unless the number is too large, in which case it switches to 'e' > >

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Eric Smith
Facundo Batista wrote: > 2007/11/30, Mark Summerfield <[EMAIL PROTECTED]>: > >> BTW I notice that decimal.Decimal() numbers can't be used with the 'e', >> 'f', or 'g' formats. I know that these numbers aren't floating-point >> under the hood, but this still seems a bit counter-intuitive to me. >

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Nov 30, 2007, at 9:31 AM, Jean-Paul Calderone wrote: > On Fri, 30 Nov 2007 11:35:18 +0100, Christian Heimes > <[EMAIL PROTECTED]> wrote: >> Dirkjan Ochtman wrote: >>> I don't know how hard it would be for Jython, IronPython et al. to >>> support

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Jean-Paul Calderone
On Fri, 30 Nov 2007 11:35:18 +0100, Christian Heimes <[EMAIL PROTECTED]> wrote: >Dirkjan Ochtman wrote: >> I don't know how hard it would be for Jython, IronPython et al. to >> support this kind of interface, but seeing as how something like >> zope.interface relies on it (and therefore all of Twis

Re: [Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Facundo Batista
2007/11/30, Mark Summerfield <[EMAIL PROTECTED]>: > BTW I notice that decimal.Decimal() numbers can't be used with the 'e', > 'f', or 'g' formats. I know that these numbers aren't floating-point > under the hood, but this still seems a bit counter-intuitive to me. Adding __format__ to the Decimal

[Python-3000] str.format() -- poss. code or doc bug?

2007-11-30 Thread Mark Summerfield
Hi, I'm using Python 30a. The docs for str.format()'s 'g' format say "General format. This prints the number as a fixed-point number, unless the number is too large, in which case it switches to 'e' exponent notation." The fixed-point format uses the 'f' character. But this does not

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Christian Heimes
Dirkjan Ochtman wrote: > I don't know how hard it would be for Jython, IronPython et al. to > support this kind of interface, but seeing as how something like > zope.interface relies on it (and therefore all of Twisted, too, I > think), it's kind of mandatory anyway. zope.interface could work w

Re: [Python-3000] pyvm module - low level interface to Python's VM

2007-11-30 Thread Dirkjan Ochtman
Terry Reedy wrote: > |Maybe sys._current_frames, sys._getframe and > > Hmm. The idea of execution frames strikes me as somewhat independent of > vm. In practice, they are associated with exceptions and tracebacks. If > these were also split off from sys in another separate module, I would loo