Brett Cannon <[email protected]> added the comment:
I think you misunderstood what I was suggesting as a solution: there is no
conversion of module name to file name. It would simply be::
fullname.rpartition('.')[2] == os.path.splitext(os.path.split(self.path)[1])[0]
for path comparison. But honestly since __init__ is the only special case here,
is_package() could just do its current check and ``fullname.rpartition('.')[2]
!= '__init__'``.
And a problem with your patch is that it is only for FileLoader, which
precludes SourceLoader from getting the beneficial fix for the issue and thus
leaves out all other loaders which might use an alternative storage mechanism
than files (e.g. zip files).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14938>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com