<div dir="ltr"><div><div><div>Thanks Robert for a crisp summary of the most reasonable proposal and its ins and outs; I think the 'in' keyword and requiring leading dots are the best version of all versions considered.<br><br></div>Thanks Stephen for concisely formulating the strongest argument against: it gains too little over the alternative using existing syntax, and in fact the alternative may be considered more readable (because more explicit).<br><br></div>I would now like to close the discussion with a rejection. This email can be framed to celebrate that.<br><br></div>--Guido<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 1:11 AM, Stephen Hansen <span dir="ltr"><<a href="mailto:me+python@ixokai.io" target="_blank">me+python@ixokai.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Tue, May 3, 2016, at 12:21 AM, Robert van Geel wrote:<br>
> summarizing:<br>
>    1- the with statement should not be used for this<br>
<br>
</span>with means something now. It shouldn't have two confusing meanings. All<br>
this discussion keeps using with when I hope that's a nonstarter.<br>
<br>
If people can get behind 'using' or 'in', I don't know, but 'with'<br>
should be absolutely out. With has a meaning in Python, a meaning which<br>
doesn't map readily into this space (where 'import x as y' and 'except<br>
Ex as y' do map readily, as its about renaming/aliasing)<br>
<span class=""><br>
>    4- the benefits of .dotted shorthand syntax are disputed, some think<br>
> it's pythonic and readable, others don't think it is<br>
<br>
</span>To call it disputed undersells the claim. I'd call it horribly<br>
unreadable. A dot is just shy of invisible on its own, a leading dot<br>
evaporates besides the tabbed whitespace. No, no, no.<br>
<span class=""><br>
>    5 - Pascal style has been discussed in the past and has its own faq<br>
> explaining rejection. So anyway a dot would be needed, this would also<br>
> take away possible ambiguity between locals and object properties<br>
><br>
> About 4, the argument that full variable writing is more explicit, hence<br>
> Pythonic: I think clinging to 20 same-indentation level references to<br>
> 'obj.' is explicit to the point of sillyness. We also dont use<br>
> locals.obj.x because the localness of a variable is also present without<br>
> explicity so a bit of pragmatism could have a voice. People who think<br>
> .dotted syntax is less readable could still use the familiar syntax.<br>
<br>
</span>Again: no, no, no. Readability is more important then writability.<br>
"People who think .dotted syntax is less readable" need to be answered<br>
with a *serious* gain to override their objections. What does:<br>
<br>
using thing["this"]:<br>
    .that = "okay"<br>
    .other = "right"<br>
<br>
gain over<br>
<br>
t = thing["this"]<br>
t.that = "okay"<br>
t.other = "right"<br>
<br>
This feature is pure syntax sugar over local variables which are just<br>
fine as they are.<span class="im HOEnZb"></span><br clear="all"></blockquote></div><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div></div></div>