function v. method

Gerhard Fiedler gelists at gmail.com
Tue Jul 25 09:32:36 EDT 2006


On 2006-07-25 05:16:04, Wesley Brooks wrote:

>> prefix your names with _ or __. Both are ommited from autogenerated
>> docuementation and both are OFFICALLY not supposed to be used.
>>
> 
> Could you elaborate on that a little or point me in the right direction to
> read up on it? I'm currently re-writing a large lump of my coding and trying
> to use best practice. I thought it was considered good practice to make
> stuff private (in this case using __ ) that wasn't intened to be accessed
> from outside the function/class?

I think fuzzylollipop meant that such members should not be used from the
outside of the class; that is, they should be considered implementation,
not API. (Which is why apparently autogenerated docs leave them out.)

Gerhard




More information about the Python-list mailing list