__getattr__, __setattr__

Steve Holden steve at holdenweb.com
Thu Oct 20 11:44:57 EDT 2005


Thomas Heller wrote:
> Just wondering about this behaviour, why is it this way?
> 
> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>>object.__setattr__
> 
> <slot wrapper '__setattr__' of 'object' objects>
> 
>>>>object.__getattr__
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> AttributeError: type object 'object' has no attribute '__getattr__'
> 
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> object.__getattribute__
<slot wrapper '__getattribute__' of 'object' objects>

Ring any bells?

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/




More information about the Python-list mailing list