| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks great!
Sorry, something went wrong.
| Returns the __annotate__ function or None. | ||
| """ | ||
| if isinstance(obj, type): | ||
| return _BASE_GET_ANNOTATE(obj) |
There was a problem hiding this comment.
It may be worth explaining, in a comment or docstring (here or somewhere) why we have to go to these odd lengths.
Sorry, something went wrong.
There was a problem hiding this comment.
Good point, will do that. Thanks for reviewing!
Sorry, something went wrong.
Tests from python/cpython#122074. We don't have to use the base descriptor approach here because we find the annotations directly in the `__dict__` for the class, which avoids metaclass problems.
Tests from python/cpython#122074. We don't have to use the base descriptor approach here because we find the annotations directly in the `__dict__` for the class, which avoids metaclass problems.
| Back | FazBrowse Home | New Git URL |
A third alternative to #120719 and #120816. See python/peps#3847 (comment).
This PR is on top of #119891.
📚 Documentation preview 📚: https://cpython-previews--122074.org.readthedocs.build/