[issue13429] provide __file__ to extension init function

Stefan Behnel report at bugs.python.org
Sat Nov 19 10:18:32 CET 2011


Stefan Behnel <scoder at users.sourceforge.net> added the comment:

Replying to myself:
> I think the right fix for Python 4 would be to simply pass
> a context struct into the module init function.

Actually, this doesn't have to wait for Python 4. Changing the module init function to take a parameter should be backwards compatible in C. Existing code simply wouldn't read the value from the stack, and new (or updated) code could benefit from the feature, Cython code in particular.

Here is a follow-up ticket for this more general feature:

http://bugs.python.org/issue13431

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13429>
_______________________________________


More information about the Python-bugs-list mailing list