[Python-ideas] Pseudo-package for current directory

Random832 random832 at fastmail.com
Mon Mar 7 13:52:01 EST 2016


On Mon, Mar 7, 2016, at 13:04, Steven D'Aprano wrote:
> > Idle could be protected from accidentally importing someone's
> > "html.py", because "import html" shouldn't ever import from the
> > current directory.
> 
> That won't help when the user runs
> 
> python3 html.py

It would if doing so *only* loads it as sys.modules['__main__'] and
leaves sys.modules['html'] empty.


More information about the Python-ideas mailing list