[issue13046] imp.find_module() should not find unimportable modules

2011-09-26 Thread Brett Cannon
Brett Cannon added the comment: I'm w/ Ezio on this; imp.find_module() handling modules whose names can't be used by __import__() is fine. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue13046] imp.find_module() should not find unimportable modules

2011-09-25 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I mean files, which cannot be imported even by __import__(). I know that __import__() can import foo-bar.py. -- ___ Python tracker ___

[issue13046] imp.find_module() should not find unimportable modules

2011-09-25 Thread Ezio Melotti
Ezio Melotti added the comment: I'm not sure they should be disallowed. We have ways to set variables and attributes with "invalid" names (like '.something') too. OTOH __import__ fails to import the .something due to the special meaning of the dot, but it imports things like foo-bar.py just

[issue13046] imp.find_module() should not find unimportable modules

2011-09-25 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis : imp.find_module() can find files, which cannot be imported. I suggest that imp.find_module() raise an exception in such cases. $ cd /tmp $ touch .something.py $ python3.3 Python 3.3.0a0 (default:5e456e1a9e8c+, Sep 25 2011, 18:57:23) [G