[Python-Dev] okay to remove argparse.__all__?
Oleg Broytman
phd at phd.pp.ru
Mon Nov 1 16:08:27 CET 2010
On Mon, Nov 01, 2010 at 02:55:25PM +0000, Steven Bethard wrote:
> On Mon, Nov 1, 2010 at 2:53 PM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> > Isn't it better to add the missing elements - what is the problem with that
> > approach?
>
> It just requires extra synchronization, and history shows that I
> always forget to add them. ;-)
Automate:
for key, value in globals().items():
if not key.startswith('_'):
__all__.append(key)
Further filter (by key or value) to your needs.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-Dev
mailing list