This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients
Date 2004-08-25.06:30:38
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

Underneath the hood, test's setattr is accessing the
dictionary directly instead of going through its __setattr__
slot.

While this one is fixable, I'm not sure it's really a bug. 
There are no documentation promises that things like setattr
won't make direct accesses to the underlying dictionary. 
Python's implementation has tons of direct access code --
the reasons include clarity, speed, avoidance of hard to
debug code paths, or just not having been looked at in this way.

In any case, I would not have expected old style classes
like 'test' to know about new style subclasses.

For the use cases modeled after the OP's code, overiding
setattr in 'test' is likely the way to go.
History
Date User Action Args
2007-08-23 14:25:43adminlinkissue1015792 messages
2007-08-23 14:25:43admincreate