A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-July/067761.html below:

[Python-Dev] Internal namespace proposal

[Python-Dev] Internal namespace proposal [Python-Dev] Internal namespace proposalGreg Ewing greg.ewing at canterbury.ac.nz
Fri Jul 28 02:51:43 CEST 2006
David Hopwood wrote:

> Inheritance should be defined as though the code of inherited methods and
> attributes were copied into the subclass (with global accesses updated to
> point to the original module).

You'll have to propose an implementation strategy for that
which works without actually copying all the code, though.

> Since x._hidden is not accessible from attack.py, the attack fails.

But if _hidden were an attribute of the A instance that
you were trying to protect, it would succeed. So you
can't actually protect any direct attribute of a class
that can be subclassed. Which means we're back to the
situation of having to prevent access to class objects.

--
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4