<div dir="ltr">Okay, well I'm sorry for the trouble then!!</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 7, 2015 at 11:03 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"><span class="">On 8 June 2015 at 12:47, Neil Girdhar <<a href="mailto:mistersheik@gmail.com">mistersheik@gmail.com</a>> wrote:<br>
> You're right.  And as usual, Nick, your analysis is spot on.  My main<br>
> concern is that the idealized way of parsing the language is not precluded<br>
> by any change.  Does adding token manipulation promise forwards<br>
> compatibility?  Will a Python 3.9 have to have the same kind of token<br>
> manipulator exposed.  If not, then I'm +1 on token manipulation. :)<br>
<br>
</span>That may have been the heart of the confusion, as token manipulation<br>
is *already* a public feature:<br>
<a href="https://docs.python.org/3/library/tokenize.html" target="_blank">https://docs.python.org/3/library/tokenize.html</a><br>
<br>
The tokenizer module has been a public part of Python for longer than<br>
I've been a Pythonista (first documented in 1.5.2 in 1999):<br>
<a href="https://docs.python.org/release/1.5.2/lib/module-tokenize.html" target="_blank">https://docs.python.org/release/1.5.2/lib/module-tokenize.html</a><br>
<br>
As a result, token stream manipulation is already possible, you just<br>
have to combine the tokens back into a byte stream before feeding them<br>
to the compiler. Any future Python interpreter would be free to fall<br>
back on implementing a token based API that way, if the CPython code<br>
generator itself were to gain a native token stream interface.<br>
<br>
Cheers,<br>
<div class="HOEnZb"><div class="h5">Nick.<br>
<br>
--<br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>
</div></div></blockquote></div><br></div>