Skip to content
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
serhiy-storchaka and AlexWaygood authored May 29, 2024
commit 718259756c25f8b9a00464cff98c7857cc41c8e5
8 changes: 5 additions & 3 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ are always available. They are listed here in alphabetical order.
complex(string, /)
complex(real=0, imag=0)

Convert a string or a number to a complex number or create a complex number
from the real and imaginary parts.
Convert a single string or number to a complex number, or create a
complex number from real and imaginary parts.

If the argument is a string, it should contain a decimal number, optionally
preceded by a sign, and optionally followed by the ``j`` or ``J`` suffix,
Expand Down Expand Up @@ -412,7 +412,9 @@ are always available. They are listed here in alphabetical order.

If all arguments are omitted, returns ``0j``.

Examples::
Examples:

.. doctest::

>>> complex('+1.23')
(1.23+0j)
Expand Down