←back to thread

160 points leontrolski | 1 comments | | HN request time: 0.199s | source
Show context
nemoniac ◴[] No.41887341[source]
You could argue that this is not merely adding syntax, but also adding the associated semantics.

Anyway, if you found this interesting, you might enjoy Eli Bendersky's blog post from nearly 15 years ago where he adds an "until ... do" statement to Python.

https://eli.thegreenplace.net/2010/06/30/python-internals-ad...

replies(3): >>41887390 #>>41887410 #>>41888115 #
1. pansa2 ◴[] No.41887390[source]
That blog post seems a lot more involved - it adds code to the bytecode compiler as well as to the parser.

I suspect that’s mostly because the `until` statement is more complex - but another factor seems to be Python’s change in parsing technology from LL(1) to PEG.