Nick Coghlan added the comment:

The standard library has moved on quite a bit since this patch was written...

1. source_synopsis() should be using the tokeniser module when reading the 
docstring. The current implementation is broken in more ways than just those 
noted here (e.g. it completely ignores the declared encoding)

(The reason for not using full compilation is that you would then have to 
either *run* the compiled code or else compile to the AST and interrogate that, 
which is technically implementation dependent)

2. For 3.3+, synopsis should be using importlib to get the source code rather 
than assuming filesystem imports. That's probably better handled in a separate 
issue, though.

----------
assignee: ping -> 
nosy: +ncoghlan
versions: +Python 3.3 -Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1185124>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to