[issue27985] Implement PEP 526

Ivan Levkivskyi report at bugs.python.org
Wed Sep 7 20:04:11 EDT 2016


Ivan Levkivskyi added the comment:

I could change STORE_ANNOTATION opcode so that it will recreate __annotations__ if __name__ == '__main__'.

Or do you now think that it should re-create it always? I still think that always re-creating __annotations__ if they don't exist seems like silencing a possible error. As I mentioned in previous discussion, I think we should allow people to explicitly del __annotations__ (for example if someone wants to make a class with annotations that are "invisible" to runtime tools) and warn them if later they use annotations.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27985>
_______________________________________


More information about the Python-bugs-list mailing list