Message22208
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. |
|
Date |
User |
Action |
Args |
2007-08-23 14:25:43 | admin | link | issue1015792 messages |
2007-08-23 14:25:43 | admin | create | |
|