summaryrefslogtreecommitdiffstats
path: root/Doc
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
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')
-rw-r--r--Doc/c-api/newtypes.rst15
-rw-r--r--Doc/glossary.rst29
-rw-r--r--Doc/library/decimal.rst2
3 files changed, 10 insertions, 36 deletions
diff --git a/Doc/c-api/newtypes.rst b/Doc/c-api/newtypes.rst
index f1ab34e..7adf969 100644
--- a/Doc/c-api/newtypes.rst
+++ b/Doc/c-api/newtypes.rst
@@ -330,7 +330,7 @@ functionality. The fields of the type object are examined in detail in this
section. The fields will be described in the order in which they occur in the
structure.
-Typedefs: unaryfunc, binaryfunc, ternaryfunc, inquiry, coercion, intargfunc,
+Typedefs: unaryfunc, binaryfunc, ternaryfunc, inquiry, intargfunc,
intintargfunc, intobjargproc, intintobjargproc, objobjargproc, destructor,
freefunc, printfunc, getattrfunc, getattrofunc, setattrfunc, setattrofunc,
cmpfunc, reprfunc, hashfunc
@@ -751,19 +751,6 @@ type objects) *must* have the :attr:`ob_size` field.
:attr:`sq_inplace_repeat`.
- .. data:: Py_TPFLAGS_CHECKTYPES
-
- If this bit is set, the binary and ternary operations in the
- :ctype:`PyNumberMethods` structure referenced by :attr:`tp_as_number` accept
- arguments of arbitrary object types, and do their own type conversions if
- needed. If this bit is clear, those operations require that all arguments have
- the current type as their type, and the caller is supposed to perform a coercion
- operation first. This applies to :attr:`nb_add`, :attr:`nb_subtract`,
- :attr:`nb_multiply`, :attr:`nb_divide`, :attr:`nb_remainder`, :attr:`nb_divmod`,
- :attr:`nb_power`, :attr:`nb_lshift`, :attr:`nb_rshift`, :attr:`nb_and`,
- :attr:`nb_xor`, and :attr:`nb_or`.
-
-
.. data:: Py_TPFLAGS_HAVE_RICHCOMPARE
If this bit is set, the type object has the :attr:`tp_richcompare` field, as
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
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index ee4aeec..1616848 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -312,7 +312,7 @@ Decimal floating point objects share many properties with the other built-in
numeric types such as :class:`float` and :class:`int`. All of the usual math
operations and special methods apply. Likewise, decimal objects can be copied,
pickled, printed, used as dictionary keys, used as set elements, compared,
-sorted, and coerced to another type (such as :class:`float` or :class:`long`).
+sorted, and converted to another type (such as :class:`float` or :class:`int`).
In addition to the standard numeric properties, decimal floating point objects
also have a number of specialized methods: