On 1/16/21 4:09 PM, Greg Ewing wrote:
On 17/01/21 12:31 pm, Larry Hastings wrote:
Consider the best practice for getting class annotations, example
here from Lib/dataclasses.py:
cls_annotations = cls.__dict__.get('__annotations__', {})
Isn't that going to get broken anyway? It won't trigger the
calling of __co_annotations__.
I proposed these as two separate conversations, because I wanted to
clean up the semantics of annotations whether or not PEP 649 was
accepted. But, yes, if PEP 649 is accepted (in some form), this
current-best-practice would no longer work, and the new best practice
would likely become much more complicated.
Cheers,
//arry/
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/3OREHZBKW2ANZG2H5WEVQC4Y2GNYHQV7/
Code of Conduct: http://python.org/psf/codeofconduct/