Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   __builtins__ in bpython (http://www.velocityreviews.com/forums/t956175-__builtins__-in-bpython.html)

chaouche yacine 01-05-2013 08:35 PM

__builtins__ in bpython
 
Hi. In the standard pytohon interpreter and in ipython, __builtins__ is a module, but in bpython it's a dictionnary. Was it redefined ?


alex23 01-06-2013 11:01 AM

Re: __builtins__ in bpython
 
On Jan 6, 6:35*am, chaouche yacine <yacinechaou...@yahoo.com> wrote:
> Hi. In the standard pytohon interpreter and in ipython, __builtins__ is amodule, but in bpython it's a dictionnary. Was it redefined ?


I'd say it's a result of however bpython works and this:

"By default, when in the __main__ module, __builtins__ is the built-in
module builtins; when in any other module, __builtins__ is an alias
for the dictionary of the builtins module itself. __builtins__ can be
set to a user-created dictionary to create a weak form of restricted
execution."

http://docs.python.org/3/reference/e...ng-and-binding

This is a guess, I've never used bpython, being really quite happy
with iPython. Your best bet would be to ask the bpython dev or log an
issue on its repository:

https://bitbucket.org/bobf/bpython/issues


All times are GMT. The time now is 06:15 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.