Kaydet (Commit) cb1f2420 authored tarafından Guido van Rossum's avatar Guido van Rossum

Document complex() with string arg.

üst b95227db
...@@ -134,11 +134,13 @@ class instances are callable if they have a \method{__call__()} method. ...@@ -134,11 +134,13 @@ class instances are callable if they have a \method{__call__()} method.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{complex}{real\optional{, imag}} \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). Each argument may be any numeric type (including complex).
If \var{imag} is omitted, it defaults to zero and the function If \var{imag} is omitted, it defaults to zero and the function
serves as a numeric conversion function like \function{int()}, 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} \end{funcdesc}
\begin{funcdesc}{delattr}{object, name} \begin{funcdesc}{delattr}{object, name}
......
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