__getattr__ and __setattr__ troubles
jkraska1 at san.rr.com
Wed May 24 19:25:35 CEST 2000
> Thanks! That was the solution. I'm still a bit surprised that
> __getattr__ was actually called for __cmp__, but there are logical
> reasons for that, I'm sure.
I think attributes and methods are somewhat born equal in python
is the deal. For example, when implementing python objects in C,
gettattr is what is used to find a method. This is what allows you
to add methods on the fly, for example. Full dynamicity, mon.
More information about the Python-list