Skip to content

Commit 4a78b3a

Browse files
committed
Update complex docs
1 parent ae6cd6c commit 4a78b3a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Doc/library/functions.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ are always available. They are listed here in alphabetical order.
417417
parts (the sign of the imaginary part is mandatory in this case).
418418
The string can optionally be surrounded by whitespaces and the round
419419
parentheses ``'('`` and ``')'``, which are ignored.
420-
The string must not contain whitespace between ``'+'``, ``'-'``, the
420+
The string must not contain whitespace between ``'+'``, ``'-'``, ``'−'`` (U+2212), the
421421
``'j'`` or ``'J'`` suffix, and the decimal number.
422422
For example, ``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` raises
423423
:exc:`ValueError`.
@@ -466,6 +466,10 @@ are always available. They are listed here in alphabetical order.
466466
Passing a complex number as the *real* or *imag* argument is now
467467
deprecated; it should only be passed as a single positional argument.
468468

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

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

0 commit comments

Comments
 (0)