Kaydet (Commit) 50819576 authored tarafından Mark Dickinson's avatar Mark Dickinson

Closes #9574: Note that complex constructor doesn't allow whitespace around central operator.

üst e107ab3b
...@@ -247,6 +247,13 @@ available. They are listed here in alphabetical order. ...@@ -247,6 +247,13 @@ available. They are listed here in alphabetical order.
the function serves as a numeric conversion function like :func:`int`, the function serves as a numeric conversion function like :func:`int`,
:func:`long` and :func:`float`. If both arguments are omitted, returns ``0j``. :func:`long` 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`. The complex type is described in :ref:`typesnumeric`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment