File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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__
You can’t perform that action at this time.
0 commit comments