Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f75b290

Browse files
committed
Merged revisions 61413-61414 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r61413 | raymond.hettinger | 2008-03-16 06:20:42 +0100 (Sun, 16 Mar 2008) | 1 line Update docs to reflect removal of Exact/Inexact ........ r61414 | georg.brandl | 2008-03-16 09:00:19 +0100 (Sun, 16 Mar 2008) | 2 lines #2299: typos in newtypes.rst. ........
1 parent 0c1f7c0 commit f75b290

2 files changed

Lines changed: 7 additions & 29 deletions

File tree

Doc/extending/newtypes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ reference counts. When don't we have to do this?
428428
* when decrementing a reference count in a :attr:`tp_dealloc` handler when
429429
garbage-collections is not supported [#]_
430430

431-
We want to want to expose our instance variables as attributes. There are a
431+
We want to expose our instance variables as attributes. There are a
432432
number of ways to do that. The simplest way is to define member definitions::
433433

434434
static PyMemberDef Noddy_members[] = {
@@ -616,7 +616,7 @@ and register it in the :attr:`tp_getset` slot::
616616

617617
Noddy_getseters, /* tp_getset */
618618

619-
to register out attribute getters and setters.
619+
to register our attribute getters and setters.
620620

621621
The last item in a :ctype:`PyGetSetDef` structure is the closure mentioned
622622
above. In this case, we aren't using the closure, so we just pass *NULL*.
@@ -1538,7 +1538,7 @@ might be something like the following::
15381538
less careful about decrementing their reference counts, however, we accept
15391539
instances of string subclasses. Even though deallocating normal strings won't
15401540
call back into our objects, we can't guarantee that deallocating an instance of
1541-
a string subclass won't. call back into out objects.
1541+
a string subclass won't call back into our objects.
15421542
15431543
.. [#] Even in the third version, we aren't guaranteed to avoid cycles. Instances of
15441544
string subclasses are allowed and string subclasses could allow cycles even if

Doc/library/numbers.rst

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77

88
The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric abstract
9-
base classes which progressively define more operations. These concepts also
10-
provide a way to distinguish exact from inexact types. None of the types defined
11-
in this module can be instantiated.
9+
base classes which progressively define more operations. None of the types
10+
defined in this module can be instantiated.
1211

1312

1413
.. class:: Number
@@ -17,27 +16,6 @@ in this module can be instantiated.
1716
*x* is a number, without caring what kind, use ``isinstance(x, Number)``.
1817

1918

20-
Exact and inexact operations
21-
----------------------------
22-
23-
.. class:: Exact
24-
25-
Subclasses of this type have exact operations.
26-
27-
As long as the result of a homogenous operation is of the same type, you can
28-
assume that it was computed exactly, and there are no round-off errors. Laws
29-
like commutativity and associativity hold.
30-
31-
32-
.. class:: Inexact
33-
34-
Subclasses of this type have inexact operations.
35-
36-
Given X, an instance of :class:`Inexact`, it is possible that ``(X + -X) + 3
37-
== 3``, but ``X + (-X + 3) == 0``. The exact form this error takes will vary
38-
by type, but it's generally unsafe to compare this type for equality.
39-
40-
4119
The numeric tower
4220
-----------------
4321

@@ -77,7 +55,7 @@ The numeric tower
7755

7856
.. class:: Rational
7957

80-
Subtypes both :class:`Real` and :class:`Exact`, and adds
58+
Subtypes :class:`Real` and adds
8159
:attr:`Rational.numerator` and :attr:`Rational.denominator` properties, which
8260
should be in lowest terms. With these, it provides a default for
8361
:func:`float`.
@@ -237,4 +215,4 @@ forward and reverse instances of any given operator. For example,
237215

238216
__add__, __radd__ = _operator_fallbacks(_add, operator.add)
239217

240-
# ...
218+
# ...

0 commit comments

Comments
 (0)