10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
5b556b8
d11a723
cbdfbfa
fdd32d4
5c5267a
b7551a6
6f0f4f4
facb227
a7d36fa
f4fe7f9
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
(Might be worth adding a test like this to python/cpython#103764 as well; I couldn't spot one)
Sorry, something went wrong.
Good point, python/cpython@d4e72a5
The PEP specifies that these attributes should be read-only, so shouldn't they be read-only properties here?
I suppose we could do that, but it feels unnecessarily complicated.
I don't feel strongly, but it doesn't feel that complicated to me, and I think it would be nice to match CPython on 3.12+ here 🤷♂️
In python/cpython#103764, it looks like __module__ is always "typing", no matter what module the type alias is defined in:
__module__
"typing"
>>> type T = int | str >>> T.__module__ 'typing'
I like the behavior you have in this PR more, but it's more complicated to implement, and doesn't match the CPython PR currently :)
(Resolved by python/cpython#104550, for future reference)