Subclassing builtins or another alternative
jkraska at san.rr.com
Wed Dec 12 01:30:04 CET 2001
I have an external C-extension type. Let's call it "Agent".
I would like to allow coders using Agent to use it syntactically
as a normal baseclass. For example,
class Pilot ( agent.Agent ):
Misfortunately, either one can't do this or I simply misunderstand
what to hook up in the extension. Neither the setattr() or setattro()
methods appear to get invoked by either the class-level data
assignment of "i=3" or the definition of the f method on the class.
What, by the way, are the difference between setattr() and setattro()?
And can I do what I'm trying to do? If so, how?
If read some of the xxsubclass code and the like, but I'm still not
More information about the Python-list