-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPython implementation of intersections #9
Comments
Why create the |
Because we can backport Also some people will be forced to use older version for quite some time and we need backwards compatibility for them. |
Right, good point. BTW, you can still use |
Also, |
Strongly disagree with this. |
Good point. I guess as long as the linters push back, that's enough to discourage unnecessary use of it. |
Late to the party here, but note that there is precedent for adding something to typing that is immediately sort-of-deprecated: PEP 646 added |
Just an FYI, I rebased this on the latest CPython main |
This is my stab at a reference implementation of the Intersection type in CPython:
https://github.com/tomasr8/cpython/tree/intersection-type
Contributions/improvements welcome!
Build instructions:
https://devguide.python.org/getting-started/setup-building/
TLDR:
git remote add tomasr8 https://github.com/tomasr8/cpython git fetch tomasr8 git checkout --track tomasr8/intersection-type make clean && make -s -j2 ./python
TODOs
Example
The text was updated successfully, but these errors were encountered: