Skip to content

Crash on entering function call #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ikanobori opened this issue Jul 4, 2014 · 1 comment
Closed

Crash on entering function call #168

ikanobori opened this issue Jul 4, 2014 · 1 comment

Comments

@ikanobori
Copy link
Contributor

Entering the following code crashes BPython.

Code:

#!pycon

>>> func = lambda (x, y), z: (x, y, z)
>>> func((1, 2), 3

Exception:

#!pytb

Traceback (most recent call last):
  File "/usr/bin/bpython", line 9, in <module>
    load_entry_point('bpython==0.9.6.2', 'console_scripts', 'bpython')()
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 1594, in main
    banner=banner)
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 1496, in curses_wrapper
    return func(stdscr, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 1562, in main_curses
    repl.repl()
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 937, in repl
    inp = self.get_line()
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 546, in get_line
    if self.p_key(key) is None:
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 836, in p_key
    self.addstr(key)
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 263, in addstr
    self.complete()
  File "/usr/lib/pymodules/python2.6/bpython/cli.py", line 360, in complete
    self.list_win_visible = Repl.complete(self, tab)
  File "/usr/lib/pymodules/python2.6/bpython/repl.py", line 519, in complete
    matches.extend(name + '=' for name in self.argspec[1][0]
  File "/usr/lib/pymodules/python2.6/bpython/repl.py", line 520, in <genexpr>
    if name.startswith(cw))
AttributeError: 'list' object has no attribute 'startswith'

@ikanobori
Copy link
Contributor Author

Duplicate of #133.


Original Comment By: Andreas Stührk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant