[Python-ideas] Transportable indent level markers. >>>===<<<

Nick Coghlan ncoghlan at gmail.com
Thu Dec 15 02:29:48 CET 2011

On Thu, Dec 15, 2011 at 11:08 AM, Ron Adam <ron3200 at gmail.com> wrote:
> It only changes the pre-tokenized representation of the language.  To do
> braces correctly, it would require much deeper changes.

This comment makes me think you may be working off a misunderstanding
of the way Python's tokenisation works.

Suites in Python's token stream are *already* explicitly delimited:
"INDENT" and "DEDENT" tokens respectively mark the beginning and end
of each suite. There's no such concept in the token stream as "don't
change the indent level" - that's the assumed behaviour.

So an explicitly delimited syntax that just offers an alternative way
to get INDENT and DEDENT tokens into the stream would be fairly

You'd probably also want an explicit ";;" token to force a
token.NEWLINE into the token stream.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list