Skip to content

Commit ae6cd6c

Browse files
committed
Update float docs
1 parent 3855919 commit ae6cd6c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/library/functions.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,8 @@ are always available. They are listed here in alphabetical order.
781781

782782
If the argument is a string, it should contain a decimal number, optionally
783783
preceded by a sign, and optionally embedded in whitespace. The optional
784-
sign may be ``'+'`` or ``'-'``; a ``'+'`` sign has no effect on the value
784+
sign may be ``'+'`` (ASCII plus sign), ``'-'`` (ASCII hyphen minus) or ````
785+
(Unicode minus sign, U+2212); a ``'+'`` sign has no effect on the value
785786
produced. The argument may also be a string representing a NaN
786787
(not-a-number), or positive or negative infinity.
787788
More precisely, the input must conform to the :token:`~float:floatvalue`
@@ -827,6 +828,10 @@ are always available. They are listed here in alphabetical order.
827828
.. versionchanged:: 3.8
828829
Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not defined.
829830

831+
.. versionchanged:: 3.15
832+
Added support for Unicode minus sign ```` (U+2212) as an alternative to ASCII
833+
hyphen minus ``-`` for denoting negative floats.
834+
830835

831836
.. index::
832837
single: __format__

0 commit comments

Comments
 (0)