]> granicus.if.org Git - python/commit
Issue #13959: Keep imp.get_magic() in C code, but cache in importlib
authorBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 22:04:03 +0000 (18:04 -0400)
committerBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 22:04:03 +0000 (18:04 -0400)
commit24117a748b02e0d2d028956c7b118f4ecd55361c
treeda68d8bba60af0d5b373f330f0c30b9af3bed28b
parent9e924ed1ac516107a91745ca6210b66388f15468
Issue #13959: Keep imp.get_magic() in C code, but cache in importlib
for performance. While get_magic() could move to Lib/imp.py, having to
support PyImport_GetMagicNumber() would lead to equal, if not more, C
code than sticking with the status quo.
Lib/imp.py
Lib/importlib/_bootstrap.py
Python/importlib.h