Message 274929 - Python tracker
Each statement at the REPL should re-initialize __annotations__ if it contains any annotations. I think this is how exec() already works. It adds __annotations__ to the namespace as needed, but just updates it if present. Inside a class it's different, that should be considered a single block.