On 2/11/07, <b class="gmail_sendername">Ben North</b> &lt;<a href="mailto:ben@redfrontdoor.org">ben@redfrontdoor.org</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>A few days ago I posted to python-ideas with a suggestion for some new<br>Python syntax, which would allow easier access to object attributes<br>where the attribute name is known only at run-time.&nbsp;&nbsp;For example:
<br><br>&nbsp;&nbsp; setattr(self, method_name, getattr(self.metadata, method_name))<br><br>from Lib/distutils/dist.py could be rewritten<br><br>&nbsp;&nbsp; self.(method_name) = self.metadata.(method_name)<br><br>The new syntax would also be usable in augmented assignments, as in
<br><br>&nbsp;&nbsp; obj.(attr_name) += 1<br></blockquote></div><br>&nbsp; -1 from me.&nbsp; It does not solve a common problem, therefore it does not deserve a special syntax.&nbsp;&nbsp; Moreover, the existing syntax may be longer to type but is far more readable.
<br><br>-- <br>Gustavo J. A. M. Carneiro<br>&quot;The universe is always one step beyond logic.&quot;