summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2007-09-21 20:19:23 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2007-09-21 20:19:23 (GMT)
commit16c7075164abe85f7cf750d6b63ee2b5ddaa2f54 (patch)
treefffa0bfcdd832cc4d5cb323748b74c13796344e6 /Doc/glossary.rst
parent8ce81f767a48e9e645c523137c7f83e49f79f986 (diff)
downloadcpython-16c7075164abe85f7cf750d6b63ee2b5ddaa2f54.zip
cpython-16c7075164abe85f7cf750d6b63ee2b5ddaa2f54.tar.gz
cpython-16c7075164abe85f7cf750d6b63ee2b5ddaa2f54.tar.bz2
Remove more cruft leftover from nb_coerce. Rename nb_coerce to
nb_reserved.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst29
1 files changed, 8 insertions, 21 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 3b4d625..5f0d4c0 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -32,19 +32,6 @@ Glossary
One of the two flavors of classes in earlier Python versions. Since
Python 3.0, there are no classic classes anymore.
- coercion
- The implicit conversion of an instance of one type to another during an
- operation which involves two arguments of the same type. For example,
- ``int(3.15)`` converts the floating point number to the integer ``3``, but
- in ``3+4.5``, each argument is of a different type (one int, one float),
- and both must be converted to the same type before they can be added or it
- will raise a ``TypeError``. Coercion between two operands can be
- performed with the ``coerce`` builtin function; thus, ``3+4.5`` is
- equivalent to calling ``operator.add(*coerce(3, 4.5))`` and results in
- ``operator.add(3.0, 4.5)``. Without coercion, all arguments of even
- compatible types would have to be normalized to the same value by the
- programmer, e.g., ``float(3)+4.5`` rather than just ``3+4.5``.
-
complex number
An extension of the familiar real number system in which all numbers are
expressed as a sum of a real part and an imaginary part. Imaginary
@@ -168,14 +155,14 @@ Glossary
integer division
Mathematical division discarding any remainder. For example, the
expression ``11/4`` currently evaluates to ``2`` in contrast to the
- ``2.75`` returned by float division. Also called *floor division*.
- When dividing two integers the outcome will always be another integer
- (having the floor function applied to it). However, if one of the operands
- is another numeric type (such as a :class:`float`), the result will be
- coerced (see :term:`coercion`) to a common type. For example, an integer
- divided by a float will result in a float value, possibly with a decimal
- fraction. Integer division can be forced by using the ``//`` operator
- instead of the ``/`` operator. See also :term:`__future__`.
+ ``2.75`` returned by float division. Also called *floor division*. When
+ dividing two integers the outcome will always be another integer (having
+ the floor function applied to it). However, if the operands types are
+ different, one of them will be converted to the other's type. For
+ example, an integer divided by a float will result in a float value,
+ possibly with a decimal fraction. Integer division can be forced by using
+ the ``//`` operator instead of the ``/`` operator. See also
+ :term:`__future__`.
interactive
Python has an interactive interpreter which means that you can try out