[Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

Guido van Rossum guido at python.org
Sat Apr 10 02:41:48 CEST 2010


On Fri, Apr 9, 2010 at 3:54 PM, Paul Moore <p.f.moore at gmail.com> wrote:
> On 9 April 2010 23:00, Barry Warsaw <barry at python.org> wrote:
>> On Apr 09, 2010, at 02:52 PM, Guido van Rossum wrote:
>>
>>>It may be undocumented but it doesn't start with _ and it exists to
>>>preserve backwards compatibility. So I recommend adding
>>>PyImport_ExecCodeModuleExEx().
>>
>> Cool, thanks.  Now I can't wait for PyImport_ExecCodeModuleExExEx() :)
>
> Would it be better to name this one _PyImport_ExecCodeModuleExEx (with
> an underscore) so that we *don't* need to create an ExExEx version in
> future? (Sorry, Barry :-))

I don't care about what name you pick, and my ExEx proposal was meant
to include half a wink, but http://docs.python.org/c-api/import.html
makes it clear that PyImport_ExecCodeModuleEx() is far from private!
(I don't know where Barry got that idea.) While Google Code Search
finds mostly references to PyImport_ExecCodeModuleEx in the Python
source code and various copies of it, it also shows some real uses,
e.g.
http://www.google.com/codesearch/p?hl=en#bkFK9YpaWlI/ubuntu/pool/universe/y/yehia/yehia_0.5.4.orig.tar.gz|PZ0_Xf7QzC0/yehia-0.5.4.orig/plugins/python/python-loader.cc&q=PyImport_ExecCodeModuleEx

-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-Dev mailing list