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

Skip to content

Commit 3d36f0f

Browse files
committed
Spelling and grammar fixes in code comments and documentation
1 parent 8f1dd22 commit 3d36f0f

11 files changed

Lines changed: 12 additions & 12 deletions

File tree

Include/unicodeobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ PyAPI_FUNC(int) PyUnicode_EncodeDecimal(
11381138
11391139
These are capable of handling Unicode objects and strings on input
11401140
(we refer to them as strings in the descriptions) and return
1141-
Unicode objects or integers as apporpriate. */
1141+
Unicode objects or integers as appropriate. */
11421142

11431143
/* Concat two strings giving a new Unicode string. */
11441144

@@ -1288,7 +1288,7 @@ PyAPI_FUNC(int) PyUnicode_Compare(
12881288
/* Rich compare two strings and return one of the following:
12891289
12901290
- NULL in case an exception was raised
1291-
- Py_True or Py_False for successfuly comparisons
1291+
- Py_True or Py_False for successful comparisons
12921292
- Py_NotImplemented in case the type combination is unknown
12931293
12941294
Note that Py_EQ and Py_NE comparisons can cause a UnicodeWarning in

Lib/lib-tk/ttk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def _format_elemcreate(etype, script=False, *args, **kw):
153153

154154
def _format_layoutlist(layout, indent=0, indent_size=2):
155155
"""Formats a layout list so we can pass the result to ttk::style
156-
layout and ttk::style settings. Note that the layout doesn't has to
156+
layout and ttk::style settings. Note that the layout doesn't have to
157157
be a list necessarily.
158158
159159
E.g.:

Lib/test/test_docxmlrpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def test_autolinking(self):
153153
@make_request_and_skipIf(sys.flags.optimize >= 2,
154154
"Docstrings are omitted with -O2 and above")
155155
def test_system_methods(self):
156-
"""Test the precense of three consecutive system.* methods.
156+
"""Test the presence of three consecutive system.* methods.
157157
158158
This also tests their use of parameter type recognition and the
159159
systems related to that process.

Lib/test/test_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def raise_gaierror(*args, **kwargs):
299299
"Error raising socket exception.")
300300

301301
def testSendtoErrors(self):
302-
# Testing that sendto doesn't masks failures. See #10169.
302+
# Testing that sendto doesn't mask failures. See #10169.
303303
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
304304
self.addCleanup(s.close)
305305
s.bind(('', 0))

Misc/HISTORY

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13058,7 +13058,7 @@ in Python. An example completer, rlcompleter.py, is provided.
1305813058

1305913059
- The traceback.py module has a new function tb_lineno() by Marc-Andre
1306013060
Lemburg which extracts the line number from the linenumber table in
13061-
the code object. Apparently the traceback object doesn't contains the
13061+
the code object. Apparently the traceback object doesn't contain the
1306213062
right linenumber when -O is used. Rather than guessing whether -O is
1306313063
on or off, the module itself uses tb_lineno() unconditionally.
1306413064

Misc/NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3506,7 +3506,7 @@ Library
35063506
- Issue #14157: Fix time.strptime failing without a year on February 29th.
35073507
Patch by Hynek Schlawack.
35083508

3509-
- Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'.
3509+
- Issue #14768: os.path.expanduser('~/a') doesn't work correctly when HOME is '/'.
35103510

35113511
- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running
35123512
step. Patch by Xavier de Gaye.

Objects/stringobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ string_print(PyStringObject *op, FILE *fp, int flags)
901901
fputc(quote, fp);
902902
for (i = 0; i < str_len; i++) {
903903
/* Since strings are immutable and the caller should have a
904-
reference, accessing the interal buffer should not be an issue
904+
reference, accessing the internal buffer should not be an issue
905905
with the GIL released. */
906906
c = op->ob_sval[i];
907907
if (c == quote || c == '\\')

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ classic_mro(PyObject *cls)
13791379
13801380
The next three properties are the 3 constraints in "C3".
13811381
1382-
Local precendece order.
1382+
Local precedence order.
13831383
If A precedes B in C's MRO, then A will precede B in the MRO of all
13841384
subclasses of C.
13851385

Parser/asdl_c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def visitProduct(self, product, name, depth):
136136

137137

138138
class StructVisitor(EmitVisitor):
139-
"""Visitor to generate typdefs for AST."""
139+
"""Visitor to generate typedefs for AST."""
140140

141141
def visitModule(self, mod):
142142
for dfn in mod.dfns:

Python/ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
21792179
testlist: test (',' test)* [',']
21802180
augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^='
21812181
| '<<=' | '>>=' | '**=' | '//='
2182-
test: ... here starts the operator precendence dance
2182+
test: ... here starts the operator precedence dance
21832183
*/
21842184

21852185
if (NCH(n) == 1) {

0 commit comments

Comments
 (0)