Closed
Description
when bpython tries to autocomplete function arguments and a default value for an argument is a very large dictionary, bpython crashs with "error: addstr() returned ERR" (curses, too long line?).
http://paste.pocoo.org/show/124117/
i just found one case where this happens:
import cgi;
cgi.parse( <CRASH>
this function uses //os.environ// as a default value for an argument, which is //probably// very long.
in the help pages the dict is elided ("..." in the middle of the repr):
parse(fp=None, environ={'XAUTHORITY': '/home/user/.Xauthority', 'GLADE_...*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:'}, keep_blank_values=0, strict_parsing=0)
in the source code (/usr/lib/python2.6/cgi.py) it looks like this:
def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0)
(happens with latest version from bitbucket)
- Bitbucket: https://bitbucket.org/bobf/bpython/issue/41
- Originally Reported By:
- Originally Created At: 2009-06-20T07:17:13.212