#1211, #1212, #1213: py3k fixes to the tutorial.

This commit is contained in:
Georg Brandl 2007-09-28 13:13:35 +00:00
parent 7c77f753b4
commit 2d2590de49
4 changed files with 42 additions and 47 deletions

View file

@ -131,9 +131,9 @@ and imaginary part. To extract these parts from a complex number *z*, use
0.5
The conversion functions to floating point and integer (:func:`float`,
:func:`int` and :func:`long`) don't work for complex numbers --- there is no one
correct way to convert a complex number to a real number. Use ``abs(z)`` to get
its magnitude (as a float) or ``z.real`` to get its real part. ::
:func:`int`) don't work for complex numbers --- there is not one correct way to
convert a complex number to a real number. Use ``abs(z)`` to get its magnitude
(as a float) or ``z.real`` to get its real part::
>>> a=3.0+4.0j
>>> float(a)