<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">With the proposal, the above would actually read<br>
<br>
     def abs(self):<br>
         self x, y, z<br>
<span class="">         return sqrt(x**2 + y**2 + z**2)<br>
<br>
</span>so it is obvious that z is not a global but an attribute of self.<br></blockquote><div><br></div><div>Sure, and this exists right now as an option:</div><div><br></div><div>     def abs(self):<br>         x, y, z = self.x, self.y, self.z<br><span class="">         return sqrt(x**2 + y**2 + z**2)<br></span></div><div><br></div><div>The small number of characters saved on one first line isn't worth the extra conceptual complexity of learning and reading the next construct.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> No one stops you now from giving local names to values stored in the<br>
> instance within a method body.  But when you do so, you KNOW 30 lines later<br>
> that they are local names, even after the "local-looking name is actually<br>
> an attribute" declaration has scrolled away.<br><br>
</span>As Steven has so nicely written in the mail that I responded to:<br><span class="">| If you are writing "enterprisey" heavily object oriented code, chances<br>
| are you are dealing with lots of state, lots of methods, lots of<br>
| classes, </span></blockquote><div><br></div><div>I don't buy it.  I don't want a language construct that is meant to self-destruct as soon as people's methods grow past 30 lines (yes, I know it wouldn't literally do so, but there is a pretty small threshold beyond which it turns from making "code golf" easier to actively harming readability).</div></div>
</div></div>