This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add syntax for dynamic attribute access
Type: Stage:
Components: Interpreter Core Versions: Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bennorth
Priority: normal Keywords: patch

Created on 2007-02-11 23:00 by bennorth, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
dynamic-attributes.patch.trunk.20070211 bennorth, 2007-02-11 23:00 Patch against SVN trunk as of 20070211
Messages (2)
msg51857 - (view) Author: Ben North (bennorth) * Date: 2007-02-11 23:00
Add syntax to allow easier access to attributes when
attribute name known only at run-time.  E.g., replace

   setattr(obj, attr_name, getattr(obj, attr_name) + 1)

with

   obj.(attr_name) += 1

For further discussion, see PEP 363 [PROVISIONAL NUMBER]
msg51858 - (view) Author: Ben North (bennorth) * Date: 2007-03-06 09:59
PEP rejected; closing patch.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44572
2007-02-11 23:00:43bennorthcreate