Message52881
The linecache module does not handle packages at all (Guido mentions here that he wrote it before Python had packages: http://mail.python.org/pipermail/python-dev/2005-September/056870.html).
This seems to cause problems with pdb and pydoc, as illustrated by this example:
$ mkdir pydoc_test
$ cd pydoc_test
$ echo "#" > __init__.py
$ pydoc logging
This gives a traceback due to an out of range index, resulting essentially from ./__init__.py being confused with logging/__init__.py. A line number from the latter is used as an index into a list of the lines from the former.
Patch attached, and a bit more explanation can be seen here:
https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/70902 |
|
Date |
User |
Action |
Args |
2007-08-23 15:59:10 | admin | link | issue1754483 messages |
2007-08-23 15:59:10 | admin | create | |
|