[pypy-dev] replacing/modifying __import__
arigo at tunes.org
Mon Feb 13 15:50:45 CET 2012
On Mon, Feb 13, 2012 at 15:18, Timothy Baldridge <tbaldridge at gmail.com> wrote:
> Now in CPython I can simply ovewrite __builtins__.__import__ with a
> new function that adds additional functionality to __import__.
> However, in PyPy we can't change __builtins__.
You're probably just confused about __builtin__ versus __builtins__.
Don't use the latter, even in CPython, because it only works half of
the time. It is documented as an internal detail. Always do "import
More information about the pypy-dev