Class design (information hiding)

Daniel Larsson daniel.j.larsson at gmail.com
Fri Sep 7 09:37:44 EDT 2007


On 9/7/07, Alexander Eisenhuth <newsuser at stacom-software.de> wrote:
>
> Bruno Desthuilliers schrieb:
>
> > Nope. It's either 'interface' (no leading underscore),  'implementation'
> > (single leading underscore), 'implementation with some protection
> > against accidental overriding' (two leading underscores).
>
> What do you mean with 'implementation'? What does it express?


"Don't touch my _members, they're my private parts! If you do, face the
consequences!"

Again, this isn't enforced by the language (other than the slight name
mangling on __names), but a convention that python programmers should adhere
to.

--
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070907/9d3f5554/attachment.html>


More information about the Python-list mailing list