A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-March/062626.html below:

[Python-Dev] __dict__ strangeness

[Python-Dev] __dict__ strangeness [Python-Dev] __dict__ strangenessArmin Rigo arigo at tunes.org
Sun Mar 19 21:44:01 CET 2006
Hi,

On Sat, Mar 18, 2006 at 06:57:12PM +0100, Georg Brandl wrote:
> >> >>> class D(object):
> >> ...     __dict__ = {}
> >> ...
> >> >>> d = D()
> >> >>> d.a = 1
> >> >>> d.__dict__
> >> {}
> >> >>> d.__dict__ = {}
> >> >>> d.a
> >> 1
> > 
> > Yep, that's the bug, fully reproducible in 2.3 and 2.4.

IMHO this is not a bug, it's expected behavior.  I don't see what you
could "fix" without hacking the Python 2.2 descriptor model -- which is
possible, but probably not what we *should* do.  See zseil's
explanations on the SF tracker.


A bientot,

Armin
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