
May 21, 2023
1:08 p.m.
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__.
645
Age (days ago)
645
Last active (days ago)
0 comments
1 participants
participants (1)
-
Soni L.