At 03:56 PM 12/8/2007 +1000, Nick Coghlan wrote:
>Phillip J. Eby wrote:
> >> > Does anyone else think this is an issue worth pursuing?
> >
> > A qualified yes: the Importing package took a long time to get correct
> > under all the crazy little twists and turns of importing, including
> > correctly
Phillip J. Eby wrote:
> Misc. notes for the PEP: there should be a way to determine the laziness
> of a module object without causing it to load. I also think you should
> be able to set a module's __loader__, __path__, and __file__, without
> causing it to load. That way, you can create a lazy m
Marcin ‘Qrczak’ Kowalczyk wrote:
>BTW, applying PyMethod_Type to 3 arguments crashes Python3. I think
>this line is the culprit (classobject.c):
>
> if (!PyArg_UnpackTuple(args, "method", 2, 3,
> &func, &self))
>
>Should be 2 instead of 3. There u
I'm confused about storing methods in class dictionaries from the point
of view of the C API.
1. Let's say that I have a callable PyObject called f, of my type
defined in C. I want to store something derived from f as A.m
for some class A, such that for an object a of class A, calling
a.m
heh ag
On 12/7/07, Greg Ewing <[EMAIL PROTECTED]> wrote:
>
> Gregory P. Smith wrote:
> > look at the length of a
> > hex pointer in the repr of a class for C pointer size.
>
> I don't think that will work, because the repr only uses
> as many hex digits as it needs to represent the value:
>
> >>>
On Dec 8, 2007 7:32 AM, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Phillip J. Eby wrote:
> > Misc. notes for the PEP: there should be a way to determine the laziness
> > of a module object without causing it to load. I also think you should
> > be able to set a module's __loader__, __path__, an
Nick Coghlan wrote:
> I'm far from convinced that a from-scratch rewrite (particularly in C)
> is a great idea myself - that's why I suggested a PEP to look at some of
> the issues.
Yesterday I wrote down a quick survey of codes with some use cases. Then
I compared my ideas with PJE's import too
At 09:55 PM 12/8/2007 +0100, Christian Heimes wrote:
>Nick Coghlan wrote:
> > I'm far from convinced that a from-scratch rewrite (particularly in C)
> > is a great idea myself - that's why I suggested a PEP to look at some of
> > the issues.
>
>Yesterday I wrote down a quick survey of codes with so
Nick Coghlan wrote:
> With the new abstract base classes in Py3k, I can see it being
> worthwhile to have a standard mechanism to allow callbacks to be
> registered for execution when particular modules are first imported.
>
> For example, to handle the commented out case above:
>
>@imp.imp
Phillip J. Eby wrote:
> Note that in my implementation, an entry is added to sys.modules
> immediately, so this scenario can't happen without *replacing* the
> sys.modules entry.
I like to separate the implementation of the post import hook from lazy
modules. I think that the hook and lazy modul
At 10:32 PM 12/8/2007 +0100, Christian Heimes wrote:
>The pre import hook can probably be implemented in pure Python with a
>meta path hook as described in http://www.python.org/dev/peps/pep-0302/.
>I see the pre import hook as a lightweight meta path hook with an easy
>to use interface.
Which mea
At 10:49 PM 12/8/2007 +0100, Christian Heimes wrote:
>Phillip J. Eby wrote:
> > Note that in my implementation, an entry is added to sys.modules
> > immediately, so this scenario can't happen without *replacing* the
> > sys.modules entry.
>
>I like to separate the implementation of the post import
Phillip J. Eby wrote:
> Lazy importing is putting a module object into sys.modules, but not
> loading its contents until you attempt to get or set a module attribute.
How is that expected to be useful? If you're not going
to access any attributes of a module, why can you simply
not import it in
At 12:37 PM 12/9/2007 +1300, Greg Ewing wrote:
>Phillip J. Eby wrote:
>
> > Lazy importing is putting a module object into sys.modules, but not
> > loading its contents until you attempt to get or set a module attribute.
>
>How is that expected to be useful? If you're not going
>to access any attri
Python 3.0 will dispense with the rarely used, but occasionally
indispensible, bsddb185 module. I extracted the source code and unit tests
from the current Python trunk, wrote a setup.py, made a couple slight mods
so it would build and pass tests under both Python 2.6 and 3.0. It's
available fro
15 matches
Mail list logo