From: Guido van Rossum Date: Thu, 25 Mar 1999 21:23:26 +0000 (+0000) Subject: Document complex() with string arg. X-Git-Tag: v1.5.2c1~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cb1f2420ea48c76f84a4542886b869da008423d4;p=thirdparty%2FPython%2Fcpython.git Document complex() with string arg. --- diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 5870978b71c1..f195740418ce 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -134,11 +134,13 @@ class instances are callable if they have a \method{__call__()} method. \end{funcdesc} \begin{funcdesc}{complex}{real\optional{, imag}} - Create a complex number with the value \var{real} + \var{imag}*j. + Create a complex number with the value \var{real} + \var{imag}*j or + convert a string or number to a complex number. Each argument may be any numeric type (including complex). If \var{imag} is omitted, it defaults to zero and the function serves as a numeric conversion function like \function{int()}, - \function{long()} and \function{float()}. + \function{long()} and \function{float()}; in this case it also + accepts a string argument which should be a valid complex number. \end{funcdesc} \begin{funcdesc}{delattr}{object, name}