Message391269
Guido, I hope I didn't choose a bad time to send this PR over (I suspect you may already be flooded by emails about PEP 563).
The jist of the PR is that it's possible to implement PEP 612 in pure-Python. Specifically, PEP 612 says:
> As before, parameters_expressions by themselves are not acceptable in places where a type is expected
https://www.python.org/dev/peps/pep-0612/#valid-use-locations
Currently, the implementation treats ``ParamSpec`` specially in all builtin ``GenericAlias`` objects just for the sake of ``collections.abc.Callable``. There isn't a need for that - it just needs ``collections.abc.Callable`` to exhibit that behaviour.
By implementing this in pure Python, we can:
- Conform more strictly to the PEP.
- Reduce complexity of the builtin ``GenericAlias`` and also speed it up because less checks are required.
- Not tie more typing.py stuff to builtin ``GenericAlias``, which is a plus in my book.
What do you think? |
|
Date |
User |
Action |
Args |
2021-04-17 03:10:35 | kj | set | recipients:
+ kj, gvanrossum |
2021-04-17 03:10:35 | kj | set | messageid: <1618629035.49.0.0863939016996.issue41559@roundup.psfhosted.org> |
2021-04-17 03:10:35 | kj | link | issue41559 messages |
2021-04-17 03:10:34 | kj | create | |
|