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

Skip to content

Commit 30b9d5d

Browse files
committed
#18705: fix a number of typos. Patch by Févry Thibault.
1 parent 67f3977 commit 30b9d5d

25 files changed

Lines changed: 44 additions & 44 deletions

Lib/_osx_support.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _find_executable(executable, path=None):
5353

5454

5555
def _read_output(commandstring):
56-
"""Output from succesful command execution or None"""
56+
"""Output from successful command execution or None"""
5757
# Similar to os.popen(commandstring, "r").read(),
5858
# but without actually using os.popen because that
5959
# function is not usable during python bootstrap.
@@ -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
@@ -225,7 +225,7 @@ def __seqToRE(self, to_convert, directive):
225225
"""Convert a list to a regex string for matching a directive.
226226
227227
Want possible matching values to be from longest to shortest. This
228-
prevents the possibility of a match occuring for a value that also
228+
prevents the possibility of a match occurring for a value that also
229229
a substring of a larger value that should have matched (e.g., 'abc'
230230
matching when 'abcdef' should have been the match).
231231

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/datetime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _days_in_month(year, month):
4949
return _DAYS_IN_MONTH[month]
5050

5151
def _days_before_month(year, month):
52-
"year, month -> number of days in year preceeding first day of month."
52+
"year, month -> number of days in year preceding first day of month."
5353
assert 1 <= month <= 12, 'month must be in 1..12'
5454
return _DAYS_BEFORE_MONTH[month] + (month > 2 and _is_leap(year))
5555

Lib/difflib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def get_opcodes(self):
589589
def get_grouped_opcodes(self, n=3):
590590
""" Isolate change clusters by eliminating ranges with no changes.
591591
592-
Return a generator of groups with upto n lines of context.
592+
Return a generator of groups with up to n lines of context.
593593
Each group is in the same format as returned by get_opcodes().
594594
595595
>>> from pprint import pprint
@@ -1365,7 +1365,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
13651365
linejunk -- passed on to ndiff (see ndiff documentation)
13661366
charjunk -- passed on to ndiff (see ndiff documentation)
13671367
1368-
This function returns an interator which returns a tuple:
1368+
This function returns an iterator which returns a tuple:
13691369
(from line tuple, to line tuple, boolean flag)
13701370
13711371
from/to line tuple -- (line num, line text)
@@ -1967,7 +1967,7 @@ def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False,
19671967
self._make_prefix()
19681968

19691969
# change tabs to spaces before it gets more difficult after we insert
1970-
# markkup
1970+
# markup
19711971
fromlines,tolines = self._tab_newline_replace(fromlines,tolines)
19721972

19731973
# 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
@@ -413,7 +413,7 @@ class Example:
413413
zero-based, with respect to the beginning of the DocTest.
414414
415415
- indent: The example's indentation in the DocTest string.
416-
I.e., the number of space characters that preceed the
416+
I.e., the number of space characters that precede the
417417
example's first prompt.
418418
419419
- options: A dictionary mapping from option flags to True or
@@ -893,7 +893,7 @@ def find(self, obj, name=None, module=None, globs=None, extraglobs=None):
893893
if '__name__' not in globs:
894894
globs['__name__'] = '__main__' # provide a default module name
895895

896-
# Recursively expore `obj`, extracting DocTests.
896+
# Recursively explore `obj`, extracting DocTests.
897897
tests = []
898898
self._find(tests, obj, name, module, source_lines, globs, {})
899899
# 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
# Create constants for the compiler flags in Include/code.h
5050
# We try to get them from dis to avoid duplication, but fall
51-
# back to hardcording so the dependency is optional
51+
# back to hardcoding so the dependency is optional
5252
try:
5353
from dis import COMPILER_FLAG_NAMES as _flag_names
5454
except ImportError:
@@ -185,7 +185,7 @@ def isgenerator(object):
185185
"""Return true if the object is a generator.
186186
187187
Generator objects provide these attributes:
188-
__iter__ defined to support interation over container
188+
__iter__ defined to support iteration over container
189189
close raises a new GeneratorExit exception inside the
190190
generator to terminate the iteration
191191
gi_code code object

Lib/ipaddress.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def address_exclude(self, other):
727727
minus other.
728728
729729
Raises:
730-
TypeError: If self and other are of difffering address
730+
TypeError: If self and other are of differing address
731731
versions, or if other is not a network object.
732732
ValueError: If other is not completely contained by self.
733733
@@ -1378,7 +1378,7 @@ def __init__(self, address, strict=True):
13781378
'192.0.2.1'
13791379
'192.0.2.1/255.255.255.255'
13801380
'192.0.2.1/32'
1381-
are also functionaly equivalent. That is to say, failing to
1381+
are also functionally equivalent. That is to say, failing to
13821382
provide a subnetmask will create an object with a mask of /32.
13831383
13841384
If the mask (portion after the / in the argument) is given in

0 commit comments

Comments
 (0)