api stability rules
Johan Dahlin
jdahlin at async.com.br
Fri Jan 6 18:11:36 GMT 2006
> What I propose is:
>
> * we try to give __names to make things genuinely private when they can
> be
That is discouraged by PEP-8:
"Python mangles these names with the class name: if class Foo has an
attribute named __a, it cannot be accessed by Foo.__a. (An insistent
user could still gain access by calling Foo._Foo__a.) Generally, double
leading underscores should be used only to avoid name conflicts with
attributes in classes designed to be subclassed."
Johan
More information about the bazaar
mailing list