Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

__all__, public API, private stuff, and leading _

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


ethan at stoneleaf

May 11, 2012, 9:41 AM

Post #1 of 3 (129 views)
Permalink
__all__, public API, private stuff, and leading _

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?

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list


emile at fenx

May 11, 2012, 10:01 AM

Post #2 of 3 (126 views)
Permalink
Re: __all__, public API, private stuff, and leading _ [In reply to]

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.

Emile


















--
http://mail.python.org/mailman/listinfo/python-list


ethan at stoneleaf

May 11, 2012, 11:26 AM

Post #3 of 3 (123 views)
Permalink
Re: __all__, public API, private stuff, and leading _ [In reply to]

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~
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.