-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow unary + in Literal integers #7
Comments
Yup. The symmetry argument makes sense. |
This is reasonable, and pyright, pyre, pytype, mypy (following Jelle's PR) all support it. |
Actually, pyright will need to be modified. It honors the current spec. It's easy to change. Slightly more involved if we decide that we want to support an arbitrary number of unary operators ( |
Huh, so it is, sorry about that. I've had https://pyright-play.net/ lag for me once or twice before, maybe that's what happened :-/ |
Then I suggest that pyright choses to only implement a single |
OK, let's go with that. The outcome is that |
This is to ask the Typing Council to approve python/typing#1550, specifying that
Literal[+1]
should be allowed. See also https://discuss.python.org/t/signed-values-in-literal-type/39919, cc @dmoisset.(I'm opening this issue here on this tracker so that we have a clear record of the decision, and people following this repo won't miss it.)
The text was updated successfully, but these errors were encountered: