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

Skip to content

Commit c4a55fc

Browse files
committed
Recorded merge of revisions 78024 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r78024 | georg.brandl | 2010-02-06 19:44:44 +0100 (Sa, 06 Feb 2010) | 1 line #5341: fix "builtin" where used as an adjective ("built-in" is correct). ........
1 parent 3102bd9 commit c4a55fc

14 files changed

Lines changed: 46 additions & 43 deletions

File tree

Doc/extending/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ optionally followed by an import of the module::
354354
int
355355
main(int argc, char *argv[])
356356
{
357-
/* Add a builtin module, before Py_Initialize */
357+
/* Add a built-in module, before Py_Initialize */
358358
PyImport_AppendInittab("spam", PyInit_spam);
359359

360360
/* Pass argv[0] to the Python interpreter */

Doc/faq/design.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,10 @@ order to remind you of that fact, it does not return the sorted list. This way,
649649
you won't be fooled into accidentally overwriting a list when you need a sorted
650650
copy but also need to keep the unsorted version around.
651651

652-
In Python 2.4 a new builtin -- :func:`sorted` -- has been added. This function
653-
creates a new list from a provided iterable, sorts it and returns it. For
654-
example, here's how to iterate over the keys of a dictionary in sorted order::
652+
In Python 2.4 a new built-in function -- :func:`sorted` -- has been added.
653+
This function creates a new list from a provided iterable, sorts it and returns
654+
it. For example, here's how to iterate over the keys of a dictionary in sorted
655+
order::
655656

656657
for key in sorted(mydict):
657658
... # do whatever with mydict[key]...

Doc/faq/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``).
441441
Can I create an object class with some methods implemented in C and others in Python (e.g. through inheritance)?
442442
----------------------------------------------------------------------------------------------------------------
443443

444-
In Python 2.2, you can inherit from builtin classes such as :class:`int`,
444+
In Python 2.2, you can inherit from built-in classes such as :class:`int`,
445445
:class:`list`, :class:`dict`, etc.
446446

447447
The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index.html)

Doc/faq/library.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ your topic of interest will usually find something helpful.
2525
Where is the math.py (socket.py, regex.py, etc.) source file?
2626
-------------------------------------------------------------
2727

28-
If you can't find a source file for a module it may be a builtin or dynamically
29-
loaded module implemented in C, C++ or other compiled language. In this case
30-
you may not have the source file or it may be something like mathmodule.c,
31-
somewhere in a C source directory (not on the Python Path).
28+
If you can't find a source file for a module it may be a built-in or
29+
dynamically loaded module implemented in C, C++ or other compiled language.
30+
In this case you may not have the source file or it may be something like
31+
mathmodule.c, somewhere in a C source directory (not on the Python Path).
3232

3333
There are (at least) three kinds of modules in Python:
3434

@@ -361,7 +361,7 @@ therefore atomic from the point of view of a Python program.
361361

362362
In theory, this means an exact accounting requires an exact understanding of the
363363
PVM bytecode implementation. In practice, it means that operations on shared
364-
variables of builtin data types (ints, lists, dicts, etc) that "look atomic"
364+
variables of built-in data types (ints, lists, dicts, etc) that "look atomic"
365365
really are.
366366

367367
For example, the following operations are all atomic (L, L1, L2 are lists, D,
@@ -504,9 +504,9 @@ I can't seem to use os.read() on a pipe created with os.popen(); why?
504504

505505
:func:`os.read` is a low-level function which takes a file descriptor, a small
506506
integer representing the opened file. :func:`os.popen` creates a high-level
507-
file object, the same type returned by the builtin :func:`open` function. Thus,
508-
to read n bytes from a pipe p created with :func:`os.popen`, you need to use
509-
``p.read(n)``.
507+
file object, the same type returned by the built-in :func:`open` function.
508+
Thus, to read n bytes from a pipe p created with :func:`os.popen`, you need to
509+
use ``p.read(n)``.
510510

511511

512512
.. XXX update to use subprocess. See the :ref:`subprocess-replacements` section.
@@ -607,10 +607,11 @@ Python file objects are a high-level layer of abstraction on top of C streams,
607607
which in turn are a medium-level layer of abstraction on top of (among other
608608
things) low-level C file descriptors.
609609

610-
For most file objects you create in Python via the builtin ``open`` constructor,
611-
``f.close()`` marks the Python file object as being closed from Python's point
612-
of view, and also arranges to close the underlying C stream. This also happens
613-
automatically in f's destructor, when f becomes garbage.
610+
For most file objects you create in Python via the built-in ``open``
611+
constructor, ``f.close()`` marks the Python file object as being closed from
612+
Python's point of view, and also arranges to close the underlying C stream.
613+
This also happens automatically in ``f``'s destructor, when ``f`` becomes
614+
garbage.
614615

615616
But stdin, stdout and stderr are treated specially by Python, because of the
616617
special status also given to them by C. Running ``sys.stdout.close()`` marks

Doc/faq/programming.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ it is much shorter and far faster to use ::
178178

179179
L2 = list(L1[:3]) # "list" is redundant if L1 is a list.
180180

181-
Note that the functionally-oriented builtins such as :func:`map`, :func:`zip`,
182-
and friends can be a convenient accelerator for loops that perform a single
183-
task. For example to pair the elements of two lists together::
181+
Note that the functionally-oriented built-in functions such as :func:`map`,
182+
:func:`zip`, and friends can be a convenient accelerator for loops that
183+
perform a single task. For example to pair the elements of two lists
184+
together::
184185

185186
>>> list(zip([1, 2, 3], [4, 5, 6]))
186187
[(1, 4), (2, 5), (3, 6)]
@@ -203,7 +204,7 @@ manipulating strings, use the ``replace()`` and the ``format()`` :ref:`methods
203204
on string objects <string-methods>`. Use regular expressions only when you're
204205
not dealing with constant string patterns.
205206

206-
Be sure to use the :meth:`list.sort` builtin method to do sorting, and see the
207+
Be sure to use the :meth:`list.sort` built-in method to do sorting, and see the
207208
`sorting mini-HOWTO <http://wiki.python.org/moin/HowTo/Sorting>`_ for examples
208209
of moderately advanced usage. :meth:`list.sort` beats other techniques for
209210
sorting in all but the most extreme circumstances.
@@ -361,7 +362,7 @@ Though a bit surprising at first, a moment's consideration explains this. On
361362
one hand, requiring :keyword:`global` for assigned variables provides a bar
362363
against unintended side-effects. On the other hand, if ``global`` was required
363364
for all global references, you'd be using ``global`` all the time. You'd have
364-
to declare as global every reference to a builtin function or to a component of
365+
to declare as global every reference to a built-in function or to a component of
365366
an imported module. This clutter would defeat the usefulness of the ``global``
366367
declaration for identifying side-effects.
367368

@@ -1033,7 +1034,7 @@ trailing newline from a string.
10331034
How do I iterate over a sequence in reverse order?
10341035
--------------------------------------------------
10351036

1036-
Use the :func:`reversed` builtin function, which is new in Python 2.4::
1037+
Use the :func:`reversed` built-in function, which is new in Python 2.4::
10371038

10381039
for x in reversed(sequence):
10391040
... # do something with x...

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Glossary
315315

316316
iterator
317317
An object representing a stream of data. Repeated calls to the iterator's
318-
:meth:`__next__` (or passing it to the builtin function) :func:`next`
318+
:meth:`__next__` (or passing it to the built-in function) :func:`next`
319319
method return successive items in the stream. When no more data are
320320
available a :exc:`StopIteration` exception is raised instead. At this
321321
point, the iterator object is exhausted and any further calls to its

Doc/howto/doanddont.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ One of the most awful question asked on the newsgroup is why this code::
5252
f.read()
5353

5454
does not work. Of course, it works just fine (assuming you have a file called
55-
"www".) But it does not work if somewhere in the module, the statement ``from os
56-
import *`` is present. The :mod:`os` module has a function called :func:`open`
57-
which returns an integer. While it is very useful, shadowing builtins is one of
58-
its least useful properties.
55+
"www".) But it does not work if somewhere in the module, the statement ``from
56+
os import *`` is present. The :mod:`os` module has a function called
57+
:func:`open` which returns an integer. While it is very useful, shadowing a
58+
builtin is one of its least useful properties.
5959

6060
Remember, you can never know for sure what names a module exports, so either
6161
take what you need --- ``from module import name1, name2``, or keep them in the

Doc/library/exceptions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ The following exceptions are the exceptions that are usually raised.
241241

242242
.. exception:: StopIteration
243243

244-
Raised by builtin :func:`next` and an :term:`iterator`\'s :meth:`__next__`
245-
method to signal that there are no further values.
244+
Raised by built-in function :func:`next` and an :term:`iterator`\'s
245+
:meth:`__next__` method to signal that there are no further values.
246246

247247

248248
.. exception:: SyntaxError

Doc/library/gc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The :mod:`gc` module provides the following functions:
4343
:exc:`ValueError` is raised if the generation number is invalid. The number of
4444
unreachable objects found is returned.
4545

46-
The free lists maintained for a number of builtin types are cleared
46+
The free lists maintained for a number of built-in types are cleared
4747
whenever a full collection or collection of the highest generation (2)
4848
is run. Not all items in some free lists may be freed due to the
4949
particular implementation, in particular :class:`float`.

Doc/library/inspect.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ attributes:
8787
| frame | f_back | next outer frame object |
8888
| | | (this frame's caller) |
8989
+-----------+-----------------+---------------------------+
90-
| | f_builtins | built-in namespace seen |
90+
| | f_builtins | builtins namespace seen |
9191
| | | by this frame |
9292
+-----------+-----------------+---------------------------+
9393
| | f_code | code object being |

0 commit comments

Comments
 (0)