Why object.__getattribute__ and not object.__getattr__ ?

Kirby Urner urner at alumni.princeton.edu
Sat Oct 6 19:45:07 CEST 2001

  >>> dir(object)
  ['__class__', '__delattr__', '__getattribute__', '__hash__', '__init__',
   '__new__', '__reduce__', '__repr__', '__setattr__', '__str__']

Why this decision to do with a long spelling of __getattribute__ but
not __setattr__ or __delattr__ ?

Also, does someone have a quick explanation of how to use __new__ handy?
I'm not finding it in the tutorials (even the recent 2.2 specific one).


More information about the Python-list mailing list