summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2012-03-10 16:11:49 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2012-03-10 16:11:49 (GMT)
commitc7ceb2bc951b9e69d2bb148c80014dce080c431a (patch)
tree10d3966609b557522a19172f30c4d141c692db8f
parenteab2a50dfcb8f57870c82bcee418d0c5db558c2b (diff)
parent328dd0d5f3d20c01d85675f6e5d1001dd2a04480 (diff)
downloadcpython-c7ceb2bc951b9e69d2bb148c80014dce080c431a.zip
cpython-c7ceb2bc951b9e69d2bb148c80014dce080c431a.tar.gz
cpython-c7ceb2bc951b9e69d2bb148c80014dce080c431a.tar.bz2
merge 3.2 (#9574)
-rw-r--r--Doc/library/functions.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index e4b14b8..2674ef9 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -243,6 +243,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`.