Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63515

Re: Recover handle to shadowed builtin?

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Recover handle to shadowed builtin?
Date 2014-01-08 20:11 +0000
References <9D7A8CB8-A028-4DB0-A026-98BA4FF8124C@panix.com>
Newsgroups comp.lang.python
Message-ID <mailman.5196.1389211948.18130.python-list@python.org> (permalink)

Show all headers | View raw


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@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Recover handle to shadowed builtin? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-08 20:11 +0000

csiph-web