[Python-ideas] Recognise __init__.so
Guido van Rossum
guido at python.org
Fri Oct 31 16:06:21 CET 2008
This was a shortcut when we couldn't think of a reason why people
would ever have a __init__.so. Feel free to submit a patch but keep in
mind that there are probably a bunch of different places in tools (not
necessarily under our control) that also make this check. Why not have
an __init__.py that imports _initialize.so or something?
On Thu, Oct 30, 2008 at 10:41 PM, Greg Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> We've just been having a discussion on the Cython list
> about implementing the __init__ file of a package as
> an extension module.
> It turns out that just putting an __init__.so file
> in a directory isn't enough to make Python recognise
> it as a package.
> However, if there is both an __init__.py and an
> __init__.so, it's recognised as a package, and the
> __init__.so gets loaded. So it's possible, but only
> by exploiting some undocumented and probably accidental
> So how about officially recognising an __init__.so
> file as a package main file?
> Python-ideas mailing list
> Python-ideas at python.org
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-ideas