Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61535 > unrolled thread
| Started by | Johannes Schneider <johannes.schneider@galileo-press.de> |
|---|---|
| First post | 2013-12-11 09:23 +0100 |
| Last post | 2013-12-11 09:23 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Differences between obj.attribute and getattr(obj, "attribute") Johannes Schneider <johannes.schneider@galileo-press.de> - 2013-12-11 09:23 +0100
| From | Johannes Schneider <johannes.schneider@galileo-press.de> |
|---|---|
| Date | 2013-12-11 09:23 +0100 |
| Subject | Differences between obj.attribute and getattr(obj, "attribute") |
| Message-ID | <mailman.3873.1386752385.18130.python-list@python.org> |
Hi list, can somebody explain me the difference between accessing attributes via obj.attribute and getattr(obj, "attribute")? Is there a special reason or advantage when using getattr? bg, Johannes -- Johannes Schneider Webentwicklung johannes.schneider@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Tel.: +49.228.42.150.0 (Zentrale) .77 (Fax) http://www.galileo-press.de/ Geschäftsführer: Tomas Wehren, Ralf Kaulisch, Rainer Kaltenecker HRB 8363 Amtsgericht Bonn
Back to top | Article view | comp.lang.python
csiph-web