When is overriding __getattr__ is useful?

Discussion in 'Python' started by Rodrick Brown, Jan 7, 2013.

  1. Can someone provide an example why one would want to override __getattr__
    and __getattribute__ in a class?
    Rodrick Brown, Jan 7, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Greg Brunet

    __getattr__ weirdness

    Greg Brunet, Aug 22, 2003, in forum: Python
    Replies:
    3
    Views:
    337
    Greg Brunet
    Aug 22, 2003
  2. Anand
    Replies:
    0
    Views:
    408
    Anand
    Dec 18, 2003
  3. Samuel Kleiner

    Operator overloading and __getattr__

    Samuel Kleiner, Dec 22, 2003, in forum: Python
    Replies:
    6
    Views:
    1,904
    Shalabh Chaturvedi
    Jan 13, 2004
  4. Holger Joukl

    py2.1->py2.3.3 __getattr__ confusion

    Holger Joukl, Jul 2, 2004, in forum: Python
    Replies:
    1
    Views:
    308
    Peter Otten
    Jul 2, 2004
  5. Albert Hopkins
    Replies:
    0
    Views:
    115
    Albert Hopkins
    Jan 7, 2013
Loading...

Share This Page