-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
gh-144087: Add support for unicode MINUS SIGN in int, float and complex
#144095
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
Open
johnslavik
wants to merge
31
commits into
python:main
Choose a base branch
from
johnslavik:feat-handle-minus-sign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+78
−14
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
8951088
Add support for unicode MINUS SIGN in `int`, `float` and `complex`
johnslavik d3f7c80
Add some test coverage
johnslavik 3fe1b82
Fix test
johnslavik 973e191
Add news entry
johnslavik 2695c06
Add C API test coverage (only `test_long_fromunicodeobject`)
johnslavik cf0324a
Use `:func:` in news entry for better display
johnslavik 3855919
Update `int` docs
johnslavik ae6cd6c
Update `float` docs
johnslavik 4a78b3a
Update `complex` docs
johnslavik f233ebd
Simplify complex `complex` docs
johnslavik 03d24b2
Fix formatting
johnslavik 5ce17c9
Update float syntax snippet
johnslavik b4b9574
Update stdtypes reference
johnslavik ff013f5
Clarify `complex` docs
johnslavik ca6eca0
Slightly changed "syntax" used in `float` production list
johnslavik 26dadc5
Fix alternative used in `complex` docs, I think it was incorrect
johnslavik 6391d27
Parenthesize consistently
johnslavik f7c3fa7
Parenthesize consistently vol. 2
johnslavik 0d519f4
Empty commit to try to skip incremental lint
johnslavik 6c5994a
Test NaNs properly
johnslavik 0e7110c
Fix trailing whitespace (was confused)
johnslavik 199a879
Parenthesize in news entry too
johnslavik a9874e7
Use `.. versionchanged:: next`
johnslavik 53c7e97
Add a *What's New* entry
johnslavik d349618
Merge branch 'main' to fix conflicts
johnslavik 8b4d9b1
Make `versionchanged` entry for `float` more fitting
johnslavik 4df638d
Add more tests
johnslavik f3dccd0
Correct the grammar reference
johnslavik 9353f09
Keep character in grammar reference
johnslavik 3c2e361
Adjust docs to not say "ASCII"
ambv 301eb4b
Remove more mentions of other signs being ASCII from docs
johnslavik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Core_and_Builtins/2026-02-14-03-03-07.gh-issue-144087.KT9kaM.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| :func:`int`, :func:`float` and :func:`complex` now support strings | ||
| with ``−`` (Unicode minus sign, U+2212) as an alternative to ``-`` | ||
| (ASCII hyphen minus, U+002D). Contributed by Bartosz Sławecki. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.