Eric V. Smith <e...@trueblade.com> added the comment:

> If o.__annotations__ is None, should this function set the empty dict on the 
> object?  That seems slightly too opinionated to me.  On the other hand, the 
> user would probably expect that they could change the dict they got back.

Are you saying the user would expect to be able to change __annotations__ my 
modifying the dict they get back?

Is it ever the case that the user can modify __annotations__ through the dict 
that's returned? That is: does __annotations__ itself ever get returned?

I think you'd either want __annotations__ returned all the time, or never 
returned. Otherwise some cases could modify __annotations__, and some couldn't.

If __annotations__ is never returned, then I wouldn't set __annotations__ in 
this case.

----------

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

Reply via email to