__builtins__ in bpython

Discussion in 'Python' started by chaouche yacine, Jan 5, 2013.

  1. Hi. In the standard pytohon interpreter and in ipython, __builtins__ is a module, but in bpython it's a dictionnary. Was it redefined ?
    chaouche yacine, Jan 5, 2013
    #1
    1. Advertising

  2. chaouche yacine

    alex23 Guest

    On Jan 6, 6:35 am, chaouche yacine <> 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/executionmodel.html#naming-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
    alex23, Jan 6, 2013
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Opinder
    Replies:
    1
    Views:
    472
    Scott David Daniels
    Mar 2, 2004
  2. Bob Farrell

    bpython - fancy Python shell

    Bob Farrell, Jun 15, 2008, in forum: Python
    Replies:
    3
    Views:
    541
    Sebastian \lunar\ Wiesner
    Jun 16, 2008
  3. Karim

    Fall in love with bpython

    Karim, Jul 27, 2011, in forum: Python
    Replies:
    0
    Views:
    165
    Karim
    Jul 27, 2011
  4. Chris Angelico
    Replies:
    0
    Views:
    140
    Chris Angelico
    Oct 11, 2012
  5. Chris Angelico
    Replies:
    0
    Views:
    147
    Chris Angelico
    Oct 14, 2012
Loading...

Share This Page