On 4/24/21 7:11 AM, Nick Coghlan wrote:
On 2021年4月24日, 5:53 pm Larry Hastings, <[email protected] <mailto:[email protected]>> wrote:The good news: inspect.get_annotations() absolutely can handle it. inspect.get_annotations() is so paranoid about examining the object you pass in, I suspect you could pass in an old boot and it would pull out the annotations--if it had any.So I now suspect that my knee-jerk answer is wrong. Am I going too far down the rabbit hole? Should I /just/ make the change for user classes and leave builtin classes untouched? What do you think?I'd suggest kicking the can down the road: leave builtin classes alone for now, but file a ticket to reconsider the question for 3.11.In the meantime, inspect.get_annotations can help hide the discrepancy.
Cheers, //arry/
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/X2AQ5XTXKHPKSNVG6E5F5TROFKWY4CDM/ Code of Conduct: http://python.org/psf/codeofconduct/