summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-01-03 02:21:52 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2008-01-03 02:21:52 (GMT)
commit2f3c16be73a8562d357b9b13bbb8088e275840a7 (patch)
tree5334d4bd6c8b6456da10c0be232fb8bf95b1aca7 /Doc/reference
parent27edd829d7673a642cf5b37c3011454ec33cb715 (diff)
downloadcpython-2f3c16be73a8562d357b9b13bbb8088e275840a7.zip
cpython-2f3c16be73a8562d357b9b13bbb8088e275840a7.tar.gz
cpython-2f3c16be73a8562d357b9b13bbb8088e275840a7.tar.bz2
Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361, r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new documentation. The only significant difference is that round(x) returns a float to preserve backward-compatibility. See http://bugs.python.org/issue1689.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst8
-rw-r--r--Doc/reference/expressions.rst3
2 files changed, 6 insertions, 5 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index b45044d..6fc1f8e 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -150,7 +150,7 @@ Ellipsis
indicate the presence of the ``...`` syntax in a slice. Its truth value is
true.
-Numbers
+:class:`numbers.Number`
.. index:: object: numeric
These are created by numeric literals and returned as results by arithmetic
@@ -162,7 +162,7 @@ Numbers
Python distinguishes between integers, floating point numbers, and complex
numbers:
- Integers
+ :class:`numbers.Integral`
.. index:: object: integer
These represent elements from the mathematical set of integers (positive and
@@ -214,7 +214,7 @@ Numbers
without causing overflow, will yield the same result in the long integer domain
or when using mixed operands.
- Floating point numbers
+ :class:`numbers.Real` (:class:`float`)
.. index::
object: floating point
pair: floating point; number
@@ -229,7 +229,7 @@ Numbers
overhead of using objects in Python, so there is no reason to complicate the
language with two kinds of floating point numbers.
- Complex numbers
+ :class:`numbers.Complex`
.. index::
object: complex
pair: complex; number
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index ea2bb1a..9c416f8 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -801,7 +801,8 @@ were of integer types and the second argument was negative, an exception was
raised).
Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`.
-Raising a negative number to a fractional power results in a :exc:`ValueError`.
+Raising a negative number to a fractional power results in a :class:`complex`
+number. (Since Python 2.6. In earlier versions it raised a :exc:`ValueError`.)
.. _unary: