Larry Hastings <la...@hastings.org> added the comment:
Wouldn't it be easier to just throw an exception in the stringizing code? I note that there are dedicated functions to generate walrus, yield, yield from, and await in Python/ast_unparse.c. In theory this is a general-purpose facility, but in practice it's not part of the limited API, and it's called from literally one place, the "stringize this annotation" call site inside compile.c. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42725> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com