| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Some comments. I'm wondering whether the error message "annotate returned a non-dict" could be changed to "annotate must return a dict" or "did not return a dict"
Sorry, something went wrong.
For comparison: >>> iter(X())
Traceback (most recent call last):
File "<python-input-4>", line 1, in <module>
iter(X())
~~~~^^^^^
TypeError: iter() returned non-iterator of type 'int'
I think I'll make the __annotate__ errors similar. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good in general, a few comments.
I would prefer to remove the "set __annotate__ to None" behavior; I guess we would have to ask the Steering Council about that. Maybe not worth it unless we see it causing confusion in practice.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This implements https://peps.python.org/pep-0649/#annotate-and-annotations. In separate PRs I will work on making the compiler synthesize __annotate__ functions.