Recover handle to shadowed builtin?

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Jan 8 15:11:52 EST 2014


On 08/01/2014 19:52, Roy Smith wrote:
> I'm working with ipython's pylab mode, which replaces the builtin sum() with the one from numpy:
>
> In [105]:
> sum
>
> Out[105]:
> <function numpy.core.fromnumeric.sum>
>
> Is there any way to recover a reference to the builtin sum()?
>
>
> ---
> Roy Smith
> roy at panix.com
>

Grab it from here I suppose.

 >>> help(__builtins__.sum)
Help on built-in function sum in module __builtin__:
...

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list