Mark Shannon <m...@hotpy.org> added the comment:

PEP 526 explicitly states
"as with all dunder attributes, any undocummented use of __annotations__ is 
subject to breakage without warning"

I consider deleting __annotations__ to be undocumented use.

Do you really think that an obscure difference in the behaviour of 

>>> class C:
...     del __annotations__
...     x: int

justifies an extra bytecode, but the implicit return at the end of all 
functions (LOAD_CONST None; RETURN_VALUE) does not?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32550>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to