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

Skip to content

Commit 95817b3

Browse files
committed
Remove mentions of "plain" integers.
1 parent 6e6dcb5 commit 95817b3

7 files changed

Lines changed: 39 additions & 41 deletions

File tree

Doc/library/exceptions.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ The following exceptions are the exceptions that are actually raised.
157157

158158
.. exception:: IndexError
159159

160-
Raised when a sequence subscript is out of range. (Slice indices are silently
161-
truncated to fall in the allowed range; if an index is not a plain integer,
162-
:exc:`TypeError` is raised.)
160+
Raised when a sequence subscript is out of range. (Slice indices are
161+
silently truncated to fall in the allowed range; if an index is not an
162+
integer, :exc:`TypeError` is raised.)
163163

164164
.. XXX xref to sequences
165165
@@ -282,10 +282,10 @@ The following exceptions are the exceptions that are actually raised.
282282

283283
This exception is raised by the :func:`sys.exit` function. When it is not
284284
handled, the Python interpreter exits; no stack traceback is printed. If the
285-
associated value is a plain integer, it specifies the system exit status (passed
286-
to C's :cfunc:`exit` function); if it is ``None``, the exit status is zero; if
287-
it has another type (such as a string), the object's value is printed and the
288-
exit status is one.
285+
associated value is an integer, it specifies the system exit status (passed
286+
to C's :cfunc:`exit` function); if it is ``None``, the exit status is zero;
287+
if it has another type (such as a string), the object's value is printed and
288+
the exit status is one.
289289

290290
Instances have an attribute :attr:`code` which is set to the proposed exit
291291
status or error message (defaulting to ``None``). Also, this exception derives

Doc/library/functions.rst

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -429,25 +429,26 @@ are always available. They are listed here in alphabetical order.
429429

430430
.. function:: float([x])
431431

432-
Convert a string or a number to floating point. If the argument is a string, it
433-
must contain a possibly signed decimal or floating point number, possibly
434-
embedded in whitespace. The argument may also be [+|-]nan or [+|-]inf.
435-
Otherwise, the argument may be a plain integer
436-
or a floating point number, and a floating point number with the same value
437-
(within Python's floating point precision) is returned. If no argument is
438-
given, returns ``0.0``.
432+
Convert a string or a number to floating point. If the argument is a string,
433+
it must contain a possibly signed decimal or floating point number, possibly
434+
embedded in whitespace. The argument may also be ``'[+|-]nan'`` or
435+
``'[+|-]inf'``. Otherwise, the argument may be an integer or a floating
436+
point number, and a floating point number with the same value (within
437+
Python's floating point precision) is returned. If no argument is given,
438+
``0.0`` is returned.
439439

440440
.. note::
441441

442442
.. index::
443443
single: NaN
444444
single: Infinity
445445

446-
When passing in a string, values for NaN and Infinity may be returned, depending
447-
on the underlying C library. Float accepts the strings nan, inf and -inf for
448-
NaN and positive or negative infinity. The case and a leading + are ignored as
449-
well as a leading - is ignored for NaN. Float always represents NaN and infinity
450-
as nan, inf or -inf.
446+
When passing in a string, values for NaN and Infinity may be returned,
447+
depending on the underlying C library. Float accepts the strings
448+
``'nan'``, ``'inf'`` and ``'-inf'`` for NaN and positive or negative
449+
infinity. The case and a leading + are ignored as well as a leading - is
450+
ignored for NaN. Float always represents NaN and infinity as ``nan``,
451+
``inf`` or ``-inf``.
451452

452453
The float type is described in :ref:`typesnumeric`.
453454

@@ -873,15 +874,15 @@ are always available. They are listed here in alphabetical order.
873874
.. XXX does accept objects with __index__ too
874875
.. function:: range([start,] stop[, step])
875876

876-
This is a versatile function to create lists containing arithmetic progressions.
877-
It is most often used in :keyword:`for` loops. The arguments must be plain
878-
integers. If the *step* argument is omitted, it defaults to ``1``. If the
879-
*start* argument is omitted, it defaults to ``0``. The full form returns a list
880-
of plain integers ``[start, start + step, start + 2 * step, ...]``. If *step*
881-
is positive, the last element is the largest ``start + i * step`` less than
882-
*stop*; if *step* is negative, the last element is the smallest ``start + i *
883-
step`` greater than *stop*. *step* must not be zero (or else :exc:`ValueError`
884-
is raised). Example:
877+
This is a versatile function to create iterators yielding arithmetic
878+
progressions. It is most often used in :keyword:`for` loops. The arguments
879+
must be integers. If the *step* argument is omitted, it defaults to ``1``.
880+
If the *start* argument is omitted, it defaults to ``0``. The full form
881+
returns an iterator of integers ``[start, start + step, start + 2 * step,
882+
...]``. If *step* is positive, the last element is the largest ``start + i *
883+
step`` less than *stop*; if *step* is negative, the last element is the
884+
smallest ``start + i * step`` greater than *stop*. *step* must not be zero
885+
(or else :exc:`ValueError` is raised). Example:
885886

886887
>>> list(range(10))
887888
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Doc/library/profile.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ The resulting profiler will then call :func:`your_time_func`.
598598
timer call, along with the appropriate calibration constant.
599599

600600
:class:`cProfile.Profile`
601-
:func:`your_time_func` should return a single number. If it returns plain
601+
:func:`your_time_func` should return a single number. If it returns
602602
integers, you can also invoke the class constructor with a second argument
603603
specifying the real duration of one unit of time. For example, if
604604
:func:`your_integer_time_func` returns times measured in thousands of seconds,

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Numeric Types --- :class:`int`, :class:`float`, :class:`complex`
218218

219219
There are three distinct numeric types: :dfn:`integers`, :dfn:`floating point
220220
numbers`, and :dfn:`complex numbers`. In addition, Booleans are a subtype of
221-
plain integers. Integers have unlimited precision. Floating point numbers are
221+
integers. Integers have unlimited precision. Floating point numbers are
222222
implemented using :ctype:`double` in C. All bets on their precision are off
223223
unless you happen to know the machine you are working with.
224224

Doc/reference/datamodel.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ Ellipsis
172172

173173
There are two types of integers:
174174

175-
Plain integers
176-
.. index::
177-
object: plain integer
178-
single: OverflowError (built-in exception)
175+
Integers
179176

180177
These represent numbers in an unlimited range, subject to available (virtual)
181178
memory only. For the purpose of shift and mask operations, a binary
@@ -191,7 +188,7 @@ Ellipsis
191188

192189
These represent the truth values False and True. The two objects representing
193190
the values False and True are the only Boolean objects. The Boolean type is a
194-
subtype of plain integers, and Boolean values behave like the values 0 and 1,
191+
subtype of the integer type, and Boolean values behave like the values 0 and 1,
195192
respectively, in almost all contexts, the exception being that when converted to
196193
a string, the strings ``"False"`` or ``"True"`` are returned, respectively.
197194

Doc/reference/expressions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,9 +821,9 @@ The unary ``+`` (plus) operator yields its numeric argument unchanged.
821821
.. index:: single: inversion
822822

823823

824-
The unary ``~`` (invert) operator yields the bitwise inversion of its plain or
825-
long integer argument. The bitwise inversion of ``x`` is defined as
826-
``-(x+1)``. It only applies to integral numbers.
824+
The unary ``~`` (invert) operator yields the bitwise inversion of its integer
825+
argument. The bitwise inversion of ``x`` is defined as ``-(x+1)``. It only
826+
applies to integral numbers.
827827

828828
.. index:: exception: TypeError
829829

Doc/reference/lexical_analysis.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,9 @@ Numeric literals
565565
floating point literal, hexadecimal literal
566566
octal literal, binary literal, decimal literal, imaginary literal, complex literal
567567

568-
There are three types of numeric literals: plain integers, floating point
569-
numbers, and imaginary numbers. There are no complex literals
570-
(complex numbers can be formed by adding a real number and an imaginary number).
568+
There are three types of numeric literals: integers, floating point numbers, and
569+
imaginary numbers. There are no complex literals (complex numbers can be formed
570+
by adding a real number and an imaginary number).
571571

572572
Note that numeric literals do not include a sign; a phrase like ``-1`` is
573573
actually an expression composed of the unary operator '``-``' and the literal

0 commit comments

Comments
 (0)