[Patches] [ python-Patches-1657573 ] Add syntax for dynamic attribute access

SourceForge.net noreply at sourceforge.net
Mon Feb 12 00:00:43 CET 2007


Patches item #1657573, was opened at 2007-02-11 23:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1657573&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ben North (bennorth)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add syntax for dynamic attribute access

Initial Comment:
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]

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1657573&group_id=5470


More information about the Patches mailing list