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/105149.html below:

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

[Python-Dev] okay to remove argparse.__all__? [Python-Dev] okay to remove argparse.__all__?Steven Bethard steven.bethard at gmail.com
Mon Nov 1 15:55:25 CET 2010
On Mon, Nov 1, 2010 at 2:53 PM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> On 01/11/2010 14:48, Steven Bethard wrote:
>>
>> I think the easiest and most sensible way to address
>> http://bugs.python.org/issue9353 is to simply remove the __all__
>> definition from argparse - everything that doesn't start with an
>> underscore in the module is already meant to be exposed.
>>
>> But then I wonder - is __all__ considered part of the public API of a
>> module? Or is it okay to just remove it and assume that no one should
>> have been accessing it directly anyway?
>
> 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. ;-)

> Not defining __all__ will mean that "from argparse import *" will also
> export all the modules you import (copy, os, re, sys, textwrap).

That won't happen in the case of argparse - all modules are imported
like "import os as _os".

Steve
-- 
Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus
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