Why does python not have a mechanism for data hiding?

Mark Wooding mdw at distorted.org.uk
Sun Jun 8 14:26:09 CEST 2008

Paul Rubin <http> wrote:

> This is bogus about 95% of the time though.  For the cases where it is
> really desired, I think it's best to require the target class to be
> enable it specifically somehow, maybe by inheriting from a special
> superclass.  That could let the compiler statically resolve member
> lookups the rest of the time.

No it wouldn't.  Think about multiple inheritance.

-- [mdw]

More information about the Python-list mailing list