Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36358

When is overriding __getattr__ is useful?

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 <rodrick.brown@gmail.com>
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 <rodrick.brown@gmail.com>
Date Mon, 7 Jan 2013 10:54:02 -0500
Subject When is overriding __getattr__ is useful?
To "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.225.1357574082.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Can someone provide an example why one would want to override __getattr__
and __getattribute__ in a class?

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

When is overriding __getattr__ is useful? Rodrick Brown <rodrick.brown@gmail.com> - 2013-01-07 10:54 -0500

csiph-web