Skip to content

Commit f5469cf

Browse files
committed
#18705: fix a number of typos. Patch by Févry Thibault.
1 parent 10b5130 commit f5469cf

22 files changed

Lines changed: 34 additions & 33 deletions

Lib/Cookie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class CookieError(Exception):
238238
# a two-way quoting algorithm. Any non-text character is translated
239239
# into a 4 character sequence: a forward-slash followed by the
240240
# three-digit octal equivalent of the character. Any '\' or '"' is
241-
# quoted with a preceeding '\' slash.
241+
# quoted with a preceding '\' slash.
242242
#
243243
# These are taken from RFC2068 and RFC2109.
244244
# _LegalChars is the list of chars which don't require "'s

Lib/_osx_support.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _find_appropriate_compiler(_config_vars):
152152
# are not installed.
153153
#
154154
# Futhermore, the compiler that can be used varies between
155-
# Xcode releases. Upto Xcode 4 it was possible to use 'gcc-4.2'
155+
# Xcode releases. Up to Xcode 4 it was possible to use 'gcc-4.2'
156156
# as the compiler, after that 'clang' should be used because
157157
# gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
158158
# miscompiles Python.
@@ -192,7 +192,7 @@ def _find_appropriate_compiler(_config_vars):
192192

193193
if cc != oldcc:
194194
# Found a replacement compiler.
195-
# Modify config vars using new compiler, if not already explictly
195+
# Modify config vars using new compiler, if not already explicitly
196196
# overriden by an env variable, preserving additional arguments.
197197
for cv in _COMPILER_CONFIG_VARS:
198198
if cv in _config_vars and cv not in os.environ:
@@ -274,7 +274,7 @@ def _check_for_unavailable_sdk(_config_vars):
274274
# compile an extension using an SDK that is not present
275275
# on the current machine it is better to not use an SDK
276276
# than to fail. This is particularly important with
277-
# the standalong Command Line Tools alternative to a
277+
# the standalone Command Line Tools alternative to a
278278
# full-blown Xcode install since the CLT packages do not
279279
# provide SDKs. If the SDK is not present, it is assumed
280280
# that the header files and dev libs have been installed
@@ -378,7 +378,7 @@ def customize_config_vars(_config_vars):
378378
compilers are present, i.e. when installing pure
379379
Python dists. Customization of compiler paths
380380
and detection of unavailable archs is deferred
381-
until the first extention module build is
381+
until the first extension module build is
382382
requested (in distutils.sysconfig.customize_compiler).
383383
384384
Currently called from distutils.sysconfig

Lib/_strptime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def __seqToRE(self, to_convert, directive):
222222
"""Convert a list to a regex string for matching a directive.
223223
224224
Want possible matching values to be from longest to shortest. This
225-
prevents the possibility of a match occuring for a value that also
225+
prevents the possibility of a match occurring for a value that also
226226
a substring of a larger value that should have matched (e.g., 'abc'
227227
matching when 'abcdef' should have been the match).
228228

Lib/aifc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
compression type, and then write audio frames using writeframesraw.
124124
When all frames have been written, either call writeframes('') or
125125
close() to patch up the sizes in the header.
126-
Marks can be added anytime. If there are any marks, ypu must call
126+
Marks can be added anytime. If there are any marks, you must call
127127
close() after all frames have been written.
128128
The close() method is called automatically when the class instance
129129
is destroyed.

Lib/calendar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def monthdayscalendar(self, year, month):
220220
def yeardatescalendar(self, year, width=3):
221221
"""
222222
Return the data for the specified year ready for formatting. The return
223-
value is a list of month rows. Each month row contains upto width months.
223+
value is a list of month rows. Each month row contains up to width months.
224224
Each month contains between 4 and 6 weeks and each week contains 1-7
225225
days. Days are datetime.date objects.
226226
"""

Lib/compiler/pyassem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def order_blocks(start_block, exit_block):
125125
# Make sure every block appears in dominators, even if no
126126
# other block must precede it.
127127
dominators.setdefault(b, set())
128-
# preceeding blocks dominate following blocks
128+
# preceding blocks dominate following blocks
129129
for c in b.get_followers():
130130
while 1:
131131
dominators.setdefault(c, set()).add(b)

Lib/difflib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def get_opcodes(self):
586586
def get_grouped_opcodes(self, n=3):
587587
""" Isolate change clusters by eliminating ranges with no changes.
588588
589-
Return a generator of groups with upto n lines of context.
589+
Return a generator of groups with up to n lines of context.
590590
Each group is in the same format as returned by get_opcodes().
591591
592592
>>> from pprint import pprint
@@ -1361,7 +1361,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
13611361
linejunk -- passed on to ndiff (see ndiff documentation)
13621362
charjunk -- passed on to ndiff (see ndiff documentation)
13631363
1364-
This function returns an interator which returns a tuple:
1364+
This function returns an iterator which returns a tuple:
13651365
(from line tuple, to line tuple, boolean flag)
13661366
13671367
from/to line tuple -- (line num, line text)
@@ -1963,7 +1963,7 @@ def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False,
19631963
self._make_prefix()
19641964

19651965
# change tabs to spaces before it gets more difficult after we insert
1966-
# markkup
1966+
# markup
19671967
fromlines,tolines = self._tab_newline_replace(fromlines,tolines)
19681968

19691969
# create diffs iterator which generates side by side from/to data

Lib/doctest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class Example:
424424
zero-based, with respect to the beginning of the DocTest.
425425
426426
- indent: The example's indentation in the DocTest string.
427-
I.e., the number of space characters that preceed the
427+
I.e., the number of space characters that precede the
428428
example's first prompt.
429429
430430
- options: A dictionary mapping from option flags to True or
@@ -895,7 +895,7 @@ def find(self, obj, name=None, module=None, globs=None, extraglobs=None):
895895
if '__name__' not in globs:
896896
globs['__name__'] = '__main__' # provide a default module name
897897

898-
# Recursively expore `obj`, extracting DocTests.
898+
# Recursively explore `obj`, extracting DocTests.
899899
tests = []
900900
self._find(tests, obj, name, module, source_lines, globs, {})
901901
# Sort the tests by alpha order of names, for consistency in

Lib/genericpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def exists(path):
2222

2323

2424
# This follows symbolic links, so both islink() and isdir() can be true
25-
# for the same path ono systems that support symlinks
25+
# for the same path on systems that support symlinks
2626
def isfile(path):
2727
"""Test whether a path is a regular file"""
2828
try:

Lib/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def isgenerator(object):
165165
"""Return true if the object is a generator.
166166
167167
Generator objects provide these attributes:
168-
__iter__ defined to support interation over container
168+
__iter__ defined to support iteration over container
169169
close raises a new GeneratorExit exception inside the
170170
generator to terminate the iteration
171171
gi_code code object

0 commit comments

Comments
 (0)