Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.105 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.79; '*S*': 0.00; 'override': 0.07; 'to:name :python-list@python.org': 0.20; 'example': 0.23; 'message- id:@mail.gmail.com': 0.27; 'skip:_ 10': 0.29; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'why': 0.37; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'provide': 0.62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=LR1NwMO61Cm/ZTY475833oVElYLPMPlJF6qcS5e66dw=; b=Lz9hGLzbgOjzgSCyj7leIU18O74+PpawT7kbp6ob2ptk8z/bS0SPhPj638yq8NQ3sB YPGZo1OGajw3qWx9sCrKOd/wVzAyntARYra4tWJDpYmPkD0I/wbOIu9n0ZpbdUSwJ/mA jEDudN+ZSdJFVjehkIxvTC78vkd7MQmpzPqIwCchx6LF1I9vN5GhLtOIfwwBwTv29PVB VsZP8vXMoSiMw82hjECKl0uP6tD+mBAlnLimg9UBEg77rPWBpp7MBwCceQvpM5VEBlcK SYk/tcoEm2q3izpSwU2uBLyNCRlbxraELftOCi+KcSmojKKCBk4mRhJIjoBLW04Jny1m 8W5w== MIME-Version: 1.0 From: Rodrick Brown Date: Mon, 7 Jan 2013 10:54:02 -0500 Subject: When is overriding __getattr__ is useful? To: "python-list@python.org" Content-Type: multipart/alternative; boundary=e89a8ff1c37e5be71204d2b4d88f X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357574082 news.xs4all.nl 6906 [2001:888:2000:d::a6]:52460 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36358 --e89a8ff1c37e5be71204d2b4d88f Content-Type: text/plain; charset=ISO-8859-1 Can someone provide an example why one would want to override __getattr__ and __getattribute__ in a class? --e89a8ff1c37e5be71204d2b4d88f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Can someone provide an example why one would want to overr= ide __getattr__ and __getattribute__ in a class?=A0


=
--e89a8ff1c37e5be71204d2b4d88f--