__all__, public API, private stuff, and leading _

Ethan Furman ethan at stoneleaf.us
Fri May 11 14:26:40 EDT 2012


Emile van Sebille wrote:
> On 5/11/2012 9:41 AM Ethan Furman said...
>> Style question:
>>
>> Since __all__ (if defined) is the public API, if I am using that should
>> I also still use a leading underscore on my private data/functions/etc?
> 
> I would, even if only to alert any future maintainer of the internal vs 
> exposed nature of things.

I find that a persuasive argument, thanks.

~Ethan~



More information about the Python-list mailing list