Message206994
Yes, so basically signature line in help(open) is not shown because ast.parse fails to parse the return value
-> file object
According to grammar, it should be
-> file
or
-> 'file object'
or something like this.
as for sqlite, it fails to parse square brackets:
connect(database[, timeout, detect_types, isolation_level,\n\
check_same_thread, factory, cached_statements, uri])
As an idea, maybe we can come up with a failover i.e. if ast can't parse the signature, just use __text_signature__ instead of signature object:
Lib/pydoc.py:1325
if not argspec:
- argspec = '(...)'
+ argspec = object.__text_signature__
Or probably just don't show the signature if it is not formatted correctly as it is now (after the patch applied). |
|
Date |
User |
Action |
Args |
2013-12-27 14:12:39 | gennad | set | recipients:
+ gennad, larry, meador.inge, zach.ware, serhiy.storchaka, vajrasky |
2013-12-27 14:12:38 | gennad | set | messageid: <1388153558.99.0.532609392104.issue20075@psf.upfronthosting.co.za> |
2013-12-27 14:12:38 | gennad | link | issue20075 messages |
2013-12-27 14:12:38 | gennad | create | |
|