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

2007-12-03 Thread Jim Jewett
On 12/3/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 03:48 PM 12/3/2007 +0100, Christian Heimes wrote: > >Nick Coghlan wrote: > > > Aren't the metaclass changes in PEP 3115 partially aimed at > > > eliminating the need for stack frame hackery to implement > > > these kinds of things? Yes. >

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

2007-12-03 Thread Phillip J. Eby
At 03:48 PM 12/3/2007 +0100, Christian Heimes wrote: >Nick Coghlan wrote: > > Aren't the metaclass changes in PEP 3115 partially aimed at eliminating > > the need for stack frame hackery to implement these kinds of things? > > (e.g. the metaclass could stuff a closure into the class namespace under

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

2007-12-03 Thread Christian Heimes
Nick Coghlan wrote: > Aren't the metaclass changes in PEP 3115 partially aimed at eliminating > the need for stack frame hackery to implement these kinds of things? > (e.g. the metaclass could stuff a closure into the class namespace under > the name 'implements' to avoid any need for frame hack

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

2007-12-03 Thread Phillip J. Eby
At 10:18 PM 12/3/2007 +1000, Nick Coghlan wrote: >Phillip J. Eby wrote: > > Well, for what class-level frame hacking is typically used for, it > > would suffice to have a convenient way to refer to the local > > namespace, e.g. if you could do something like: > > > > implements(@, IExample) >

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

2007-12-03 Thread Nick Coghlan
Phillip J. Eby wrote: > Well, for what class-level frame hacking is typically used for, it > would suffice to have a convenient way to refer to the local > namespace, e.g. if you could do something like: > > implements(@, IExample) > > where @ was a shortcut for locals(). The most-used fr

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] 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] 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] 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] 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

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

2007-11-29 Thread Terry Reedy
"Christian Heimes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Shorah! | | I've started to work on a pyvm module patch today. The new | module is going to contain low level interfaces to Python's VM and some | low level types, too. So far my first version contains only a bunch o

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

2007-11-29 Thread Christian Heimes
James Y Knight wrote: > I'd like to quote some of a thread I started in Aug 2004, subject > "Classes that claim to be defined in __builtin__ but aren't". I > haven't rerun the script that generated this list (I have to find it > again, first, or rewrite it...), but assuming these types are st

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

2007-11-29 Thread James Y Knight
On Nov 29, 2007, at 11:33 AM, Christian Heimes wrote: > Shorah! > > I've started to work on a pyvm module patch today. The new > module is going to contain low level interfaces to Python's VM and > some > low level types, too. So far my first version contains only a bunch of > types. I'd like