[Python-ideas] Recognise __init__.so
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Oct 31 06:41:56 CET 2008
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
behaviour.
So how about officially recognising an __init__.so
file as a package main file?
--
Greg
More information about the Python-ideas
mailing list