One thing it misses is compile-time checks for e.g. the format spec.
print("hello")
def f():
nonlocal foo
gives: SyntaxError: no binding for nonlocal 'foo' found
before printing hello, and note that f() wasn't even called.But wow, that's the first time I've seen "nonlocal". In the ~100 packages I have installed, I see 0 usages!
[1] https://github.com/python/cpython/blob/a6a3dbb7db0516a72c5ef...
`nonlocal` is a keyword
FWIW, format_spec is available in the template structure, so the function writer could at least do a runtime check.