mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
Closes #9574: Note that complex constructor doesn't allow whitespace around central operator.
This commit is contained in:
parent
e144c74e02
commit
328dd0d5f3
@ -247,6 +247,13 @@ are always available. They are listed here in alphabetical order.
|
||||
the function serves as a numeric conversion function like :func:`int`
|
||||
and :func:`float`. If both arguments are omitted, returns ``0j``.
|
||||
|
||||
.. note::
|
||||
|
||||
When converting from a string, the string must not contain whitespace
|
||||
around the central ``+`` or ``-`` operator. For example,
|
||||
``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` raises
|
||||
:exc:`ValueError`.
|
||||
|
||||
The complex type is described in :ref:`typesnumeric`.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user