<br><div class="gmail_quote">On Mon, May 13, 2013 at 8:49 PM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":236">What Piotr's proposal crystalised for me is the idea that we really</div><div id=":236">have two different kinds of name binding in Python. I'm going to call</div><div id=":236">them "incidental binding" and "definitive binding".</div>
<div id=":236">...</div><div id=":236"></div></blockquote><div><br></div><div>Nice and clear explanation.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":236"> if hasattr(_ref, "__defname__"):<br>...<br></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":236">
The beauty of this syntax is that it means if we define __defname__<br>
appropriately on function objects and on type, then ...<br></div></blockquote></div><div><br></div>Why make __defname__ optional? If the author explicitly sticks a def in front of an assignment when they shouldn't, I think that should be an error. Do you really want:<div>
<br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="courier new, monospace">def a = 3</font></div></blockquote><div><br>to be allowed?</div><div><br clear="all"><div><font face="arial, helvetica, sans-serif">--- Bruce</font><div>
<span style="font-family:arial,helvetica,sans-serif">Latest blog post: Alice's Puzzle Page </span><a href="http://www.vroospeak.com/" style="font-family:arial,helvetica,sans-serif" target="_blank">http://www.vroospeak.com</a></div>
<div><div><font face="arial, helvetica, sans-serif">Learn how hackers think: <a href="http://j.mp/gruyere-security" target="_blank">http://j.mp/gruyere-security</a></font></div></div></div>
</div>