[Import-SIG] On singleton modules, heap types, and subinterpreters

Antoine Pitrou solipsis at pitrou.net
Tue Jul 28 15:52:46 CEST 2015

On Sun, 26 Jul 2015 12:39:21 +0200
Petr Viktorin <encukou at gmail.com> wrote:
> So, what options are there for methods of extension classes to get a
> hold of the module object (or module state)?

The "obvious" answer is to use the C equivalent of
`sys.modules[__name__]`. It should always do the right thing. However,
it's also quite inefficient and cumbersome to write.



More information about the Import-SIG mailing list