Python allows setting __path__ to turn a module into a package. However,
it's allegedly only defined for __init__.py?
Proposal:
A virtual package is a non-__init__.py whose first line of code, after
comments and future imports, assigns to __path__.
This would allow -m virtualpackage to call virtualpackage.__main__,
wherever that is. Instead of running virtualpackage.py as __main__.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/UTSSQ7IHSPLHF5DCEP2TIGKCVTNLDLME/
Code of Conduct: http://python.org/psf/codeofconduct/