
Feb. 3, 2007
7:47 p.m.
Hello, I could not find a PEP for __dir__. I was thinking today that if __dir__ was added, I would find it useful if modules implemented it by returning __all__ (when __all__ is defined). Or even better, to return the same names that would be imported by a star-import (so, if __all__ is not defined, all names which do not start with '_'). This wouldn't prevent introspection tools to use mod.__dict__ to still access the module's global dictionary, of course. But it would allow module's authors to more clearly document the module's public API. -- Giovanni Bajo
6616
Age (days ago)
6617
Last active (days ago)
1 comments
2 participants
participants (2)
-
Giovanni Bajo
-
Josiah Carlson