<div dir="ltr"><div class="gmail_quote">On Wed, Oct 31, 2012 at 5:45 AM, Devin Jeanpierre <span dir="ltr"><<a href="mailto:jeanpierreda@gmail.com" target="_blank">jeanpierreda@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 class="im">On Wed, Oct 31, 2012 at 8:33 AM, Eli Bendersky <<a href="mailto:eliben@gmail.com">eliben@gmail.com</a>> wrote:<br>
>> Is there a reason the tokenizer can't ignore newlines and<br>
>> indentation/deindentation between with/etc. and the trailing colon?<br>
>> This would solve the problem in general, without ambiguous syntax.<br>
><br>
> At the expense of making the tokenizer context dependent?<br>
<br>
</div>It's already context-dependent in some sense, but this wouldn't make<br>
it any moreso. For example, the tokenizer already ignores<br>
indents/dedents when inside parens/braces/brackets, and handling this<br>
only slightly more complex than that. In particular, the trailing<br>
colon is the one not inside braces or brackets.<br>
<br>
Also, I'd avoid the term "context-dependent". It sounds too similar to<br>
"context-sensitive" !<br></blockquote><div><br>I use the two as rough synonyms. Shouldn't I?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Anyway, it looks like this isn't how the tokenizer treats<br>
braces/brackets (it ignores indent/dedent, but not newlines (I guess<br>
the grammar handles those)). What I meant to suggest was, treat "with<br>
... :" similarly to how the OP suggests treating "with (...) :".<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br>If this gets accepted, then, is there a reason to stop at "with"? Why not ignore newlines between "if" and its trailing ":" as well? [playing devil's advocate here]<br>
<br>Eli<br><br><br><br></div></div><br></div>