This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gennad
Recipients gennad, larry, meador.inge, serhiy.storchaka, vajrasky, zach.ware
Date 2013-12-27.14:12:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1388153558.99.0.532609392104.issue20075@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2013-12-27 14:12:39gennadsetrecipients: + gennad, larry, meador.inge, zach.ware, serhiy.storchaka, vajrasky
2013-12-27 14:12:38gennadsetmessageid: <1388153558.99.0.532609392104.issue20075@psf.upfronthosting.co.za>
2013-12-27 14:12:38gennadlinkissue20075 messages
2013-12-27 14:12:38gennadcreate