New submission from cqxz:

When two files have the same name and the first changes directory to the 
second, the inspect module can retrieve the source code for the latter 
incorrectly, so a simple call to inspect.stack() can be incorrect, and will 
fail if there are less lines in the nested module (foo/bar/mod.py) than in the 
calling module (foo/mod.py)

foo/mod.py
foo/bar/mod.py

(the foo/bar/mod.py need only contain a single line, e.g. print "hello")

----------
components: Extension Modules
files: mod.py
messages: 208362
nosy: Nick.Rhinehart
priority: normal
severity: normal
status: open
title: inspect module bug for modules with same filename
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file33519/mod.py

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

Reply via email to