Skip to content
Open
Changes from 1 commit
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 Jan 21, 2026
d3f7c80
Add some test coverage
johnslavik Feb 13, 2026
3fe1b82
Fix test
johnslavik Feb 14, 2026
973e191
Add news entry
johnslavik Feb 14, 2026
2695c06
Add C API test coverage (only `test_long_fromunicodeobject`)
johnslavik Feb 14, 2026
cf0324a
Use `:func:` in news entry for better display
johnslavik Feb 14, 2026
3855919
Update `int` docs
johnslavik Feb 14, 2026
ae6cd6c
Update `float` docs
johnslavik Feb 14, 2026
4a78b3a
Update `complex` docs
johnslavik Feb 14, 2026
f233ebd
Simplify complex `complex` docs
johnslavik Feb 14, 2026
03d24b2
Fix formatting
johnslavik Feb 14, 2026
5ce17c9
Update float syntax snippet
johnslavik Feb 14, 2026
b4b9574
Update stdtypes reference
johnslavik Feb 14, 2026
ff013f5
Clarify `complex` docs
johnslavik Feb 14, 2026
ca6eca0
Slightly changed "syntax" used in `float` production list
johnslavik Feb 14, 2026
26dadc5
Fix alternative used in `complex` docs, I think it was incorrect
johnslavik Feb 14, 2026
6391d27
Parenthesize consistently
johnslavik Feb 14, 2026
f7c3fa7
Parenthesize consistently vol. 2
johnslavik Feb 14, 2026
0d519f4
Empty commit to try to skip incremental lint
johnslavik Feb 14, 2026
6c5994a
Test NaNs properly
johnslavik Feb 14, 2026
0e7110c
Fix trailing whitespace (was confused)
johnslavik Feb 14, 2026
199a879
Parenthesize in news entry too
johnslavik Feb 14, 2026
a9874e7
Use `.. versionchanged:: next`
johnslavik Feb 15, 2026
53c7e97
Add a *What's New* entry
johnslavik Feb 21, 2026
d349618
Merge branch 'main' to fix conflicts
johnslavik Feb 21, 2026
8b4d9b1
Make `versionchanged` entry for `float` more fitting
johnslavik Feb 25, 2026
4df638d
Add more tests
johnslavik Mar 2, 2026
f3dccd0
Correct the grammar reference
johnslavik Mar 2, 2026
9353f09
Keep character in grammar reference
johnslavik Mar 2, 2026
3c2e361
Adjust docs to not say "ASCII"
ambv Mar 12, 2026
301eb4b
Remove more mentions of other signs being ASCII from docs
johnslavik Mar 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update complex docs
  • Loading branch information
johnslavik committed Feb 14, 2026
commit 4a78b3ab66aed8c2338de96b7338f1d5e3c4af1a
6 changes: 5 additions & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ are always available. They are listed here in alphabetical order.
parts (the sign of the imaginary part is mandatory in this case).
The string can optionally be surrounded by whitespaces and the round
parentheses ``'('`` and ``')'``, which are ignored.
The string must not contain whitespace between ``'+'``, ``'-'``, the
The string must not contain whitespace between ``'+'``, ``'-'``, ``'−'`` (U+2212), the
``'j'`` or ``'J'`` suffix, and the decimal number.
For example, ``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` raises
:exc:`ValueError`.
Expand Down Expand Up @@ -466,6 +466,10 @@ are always available. They are listed here in alphabetical order.
Passing a complex number as the *real* or *imag* argument is now
deprecated; it should only be passed as a single positional argument.

.. versionchanged:: 3.15
Unicode minus sign ``'−'`` (U+2212) can be now used as an alternative to ASCII
hyphen minus ``'-'`` for denoting negative sign.


.. function:: delattr(object, name, /)

Expand Down
Loading