File tree Expand file tree Collapse file tree 12 files changed +16
-16
lines changed Expand file tree Collapse file tree 12 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ Object Calling API
185
185
Various functions are available for calling a Python object.
186
186
Each converts its arguments to a convention supported by the called object –
187
187
either *tp_call * or vectorcall.
188
- In order to do as litle conversion as possible, pick one that best fits
188
+ In order to do as little conversion as possible, pick one that best fits
189
189
the format of data you have available.
190
190
191
191
The following table summarizes the available functions;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ There are two kinds of configuration:
22
22
* The :ref: `Isolated Configuration <init-isolated-conf >` can be used to embed
23
23
Python into an application. It isolates Python from the system. For example,
24
24
environments variables are ignored, the LC_CTYPE locale is left unchanged and
25
- no signal handler is registred .
25
+ no signal handler is registered .
26
26
27
27
The :c:func: `Py_RunMain ` function can be used to write a customized Python
28
28
program.
@@ -696,7 +696,7 @@ PyConfig
696
696
* Otherwise, use the :term:`locale encoding`:
697
697
``nl_langinfo(CODESET)`` result.
698
698
699
- At Python statup , the encoding name is normalized to the Python codec
699
+ At Python startup , the encoding name is normalized to the Python codec
700
700
name. For example, ``"ANSI_X3.4-1968"`` is replaced with ``"ascii"``.
701
701
702
702
See also the :c:member:`~PyConfig.filesystem_errors` member.
Original file line number Diff line number Diff line change @@ -714,7 +714,7 @@ Why don't generators support the with statement?
714
714
For technical reasons, a generator used directly as a context manager
715
715
would not work correctly. When, as is most common, a generator is used as
716
716
an iterator run to completion, no closing is needed. When it is, wrap
717
- it as "contextlib.closing(generator)" in the 'with' statment .
717
+ it as "contextlib.closing(generator)" in the 'with' statement .
718
718
719
719
720
720
Why are colons required for the if/while/def/class statements?
Original file line number Diff line number Diff line change @@ -1920,7 +1920,7 @@ and classes for traversing abstract syntax trees:
1920
1920
If source contains a null character ('\0 '), :exc: `ValueError ` is raised.
1921
1921
1922
1922
.. warning ::
1923
- Note that succesfully parsing souce code into an AST object doesn't
1923
+ Note that successfully parsing source code into an AST object doesn't
1924
1924
guarantee that the source code provided is valid Python code that can
1925
1925
be executed as the compilation step can raise further :exc: `SyntaxError `
1926
1926
exceptions. For instance, the source ``return 42 `` generates a valid
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ The modern interface provides:
152
152
This version does not allow the digit 0 (zero) to the letter O (oh) and digit
153
153
1 (one) to either the letter I (eye) or letter L (el) mappings, all these
154
154
characters are included in the Extended Hex Alphabet and are not
155
- interchangable .
155
+ interchangeable .
156
156
157
157
.. versionadded :: 3.10
158
158
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ You can control how files are opened by providing an opening hook via the
50
50
*openhook * parameter to :func: `fileinput.input ` or :class: `FileInput() `. The
51
51
hook must be a function that takes two arguments, *filename * and *mode *, and
52
52
returns an accordingly opened file-like object. If *encoding * and/or *errors *
53
- are specified, they will be passed to the hook as aditional keyword arguments.
53
+ are specified, they will be passed to the hook as additional keyword arguments.
54
54
This module provides a :func: `hook_compressed ` to support compressed files.
55
55
56
56
The following function is the primary interface of this module:
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ function::
255
255
Package distributions
256
256
---------------------
257
257
258
- A convience method to resolve the distribution or
258
+ A convenience method to resolve the distribution or
259
259
distributions (in the case of a namespace package) for top-level
260
260
Python packages or modules::
261
261
Original file line number Diff line number Diff line change @@ -1249,7 +1249,7 @@ The :mod:`test.support.threading_helper` module provides support for threading t
1249
1249
Context manager catching :class: `threading.Thread ` exception using
1250
1250
:func: `threading.excepthook `.
1251
1251
1252
- Attributes set when an exception is catched :
1252
+ Attributes set when an exception is caught :
1253
1253
1254
1254
* ``exc_type ``
1255
1255
* ``exc_value ``
@@ -1458,7 +1458,7 @@ The :mod:`test.support.os_helper` module provides support for os tests.
1458
1458
.. function :: unlink(filename)
1459
1459
1460
1460
Call :func: `os.unlink ` on *filename *. On Windows platforms, this is
1461
- wrapped with a wait loop that checks for the existence fo the file.
1461
+ wrapped with a wait loop that checks for the existence of the file.
1462
1462
1463
1463
1464
1464
:mod: `test.support.import_helper ` --- Utilities for import tests
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ Standard names are defined for the following types:
243
243
244
244
.. note ::
245
245
A future version of Python may stop setting this attribute by default.
246
- To guard against this potential change, preferrably read from the
246
+ To guard against this potential change, preferably read from the
247
247
:attr: `__spec__ ` attribute instead or use
248
248
``getattr(module, "__loader__", None) `` if you explicitly need to use
249
249
this attribute.
@@ -268,7 +268,7 @@ Standard names are defined for the following types:
268
268
269
269
.. note ::
270
270
A future version of Python may stop setting this attribute by default.
271
- To guard against this potential change, preferrably read from the
271
+ To guard against this potential change, preferably read from the
272
272
:attr: `__spec__ ` attribute instead or use
273
273
``getattr(module, "__package__", None) `` if you explicitly need to use
274
274
this attribute.
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ def hide_comments(lines):
165
165
"""Tool to remove comments from given lines.
166
166
167
167
It yields empty lines in place of comments, so line numbers are
168
- still meaningfull .
168
+ still meaningful .
169
169
"""
170
170
in_multiline_comment = False
171
171
for line in lines :
Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ Built-in modules have no ``__file__`` attribute::
550
550
File "<stdin>", line 1, in <module>
551
551
AttributeError: module 'sys' has no attribute '__file__'
552
552
553
- Other C extensins are built as dynamic libraires , like the ``_asyncio `` module.
553
+ Other C extensins are built as dynamic libraries , like the ``_asyncio `` module.
554
554
They are built with the ``Py_BUILD_CORE_MODULE `` macro defined.
555
555
Example on Linux x86-64::
556
556
Original file line number Diff line number Diff line change @@ -1579,7 +1579,7 @@ Deprecated
1579
1579
1580
1580
* Currently Python accepts numeric literals immediately followed by keywords,
1581
1581
for example `` 0in x`` , `` 1or x`` , `` 0if 1else 2 `` . It allows confusing
1582
- and ambigious expressions like `` [0x1for x in y]`` (which can be
1582
+ and ambiguous expressions like `` [0x1for x in y]`` (which can be
1583
1583
interpreted as `` [0x 1 for x in y]`` or `` [0x 1f or x in y]`` ). Starting in
1584
1584
this release, a deprecation warning is raised if the numeric literal is
1585
1585
immediately followed by one of keywords :keyword:`and ` , :keyword:`else ` ,
@@ -1916,7 +1916,7 @@ Changes in the Python API
1916
1916
if the * globals * dictionary has no `` " __builtins__" `` key, rather than using
1917
1917
`` {" None" : None }`` as builtins: same behavior as :func:`eval ` and
1918
1918
:func:`exec ` functions. Defining a function with `` def function(... ): ... ``
1919
- in Python is not affected, globals cannot be overriden with this syntax: it
1919
+ in Python is not affected, globals cannot be overridden with this syntax: it
1920
1920
also inherits the current builtins.
1921
1921
(Contributed by Victor Stinner in :issue:`42990 ` .)
1922
1922
You can’t perform that action at this time.
0 commit comments