A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-November/105158.html below:

[Python-Dev] okay to remove argparse.__all__?

[Python-Dev] okay to remove argparse.__all__? [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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4