Skip to content

'Show Source' can crash bpython #103

@ikanobori

Description

@ikanobori

To reproduce:

>>> d=dir<F2>

where the important part is the equal sign. It doesn't matter what is on either side, I don't think - but the '=' seems to kill it, with this traceback:

Traceback (most recent call last):
  File "/usr/local/bin/bpython", line 8, in <module>
    load_entry_point('bpython==0.9.6.2', 'console_scripts', 'bpython')()
  File "/usr/local/lib/python2.6/dist-packages/bpython/cli.py", line 1594, in main
    banner=banner)
  File "/usr/local/lib/python2.6/dist-packages/bpython/cli.py", line 1496, in curses_wrapper
    return func(stdscr, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/bpython/cli.py", line 1562, in main_curses
    repl.repl()
  File "/usr/local/lib/python2.6/dist-packages/bpython/cli.py", line 937, in repl
    inp = self.get_line()
  File "/usr/local/lib/python2.6/dist-packages/bpython/cli.py", line 546, in get_line
    if self.p_key(key) is None:
  File "/usr/local/lib/python2.6/dist-packages/bpython/cli.py", line 813, in p_key
    obj = self.get_object(self.s)
  File "/usr/local/lib/python2.6/dist-packages/bpython/repl.py", line 389, in get_object
    obj = eval(attributes.pop(0), self.interp.locals)
  File "<string>", line 1
    d= dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions