[Python-checkins] cpython (2.7): Spelling and grammar fixes in code comments and documentation
martin.panter
python-checkins at python.org
Thu Aug 4 22:16:05 EDT 2016
https://hg.python.org/cpython/rev/5ab52b5ea4a7
changeset: 102538:5ab52b5ea4a7
branch: 2.7
user: Martin Panter <vadmium+py at gmail.com>
date: Thu Jul 28 02:37:04 2016 +0000
summary:
Spelling and grammar fixes in code comments and documentation
files:
Include/unicodeobject.h | 4 ++--
Lib/lib-tk/ttk.py | 2 +-
Lib/test/test_docxmlrpc.py | 2 +-
Lib/test/test_socket.py | 2 +-
Misc/HISTORY | 2 +-
Misc/NEWS | 2 +-
Objects/stringobject.c | 2 +-
Objects/typeobject.c | 2 +-
Parser/asdl_c.py | 2 +-
Python/ast.c | 2 +-
Tools/i18n/pygettext.py | 2 +-
11 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -1138,7 +1138,7 @@
These are capable of handling Unicode objects and strings on input
(we refer to them as strings in the descriptions) and return
- Unicode objects or integers as apporpriate. */
+ Unicode objects or integers as appropriate. */
/* Concat two strings giving a new Unicode string. */
@@ -1288,7 +1288,7 @@
/* Rich compare two strings and return one of the following:
- NULL in case an exception was raised
- - Py_True or Py_False for successfuly comparisons
+ - Py_True or Py_False for successful comparisons
- Py_NotImplemented in case the type combination is unknown
Note that Py_EQ and Py_NE comparisons can cause a UnicodeWarning in
diff --git a/Lib/lib-tk/ttk.py b/Lib/lib-tk/ttk.py
--- a/Lib/lib-tk/ttk.py
+++ b/Lib/lib-tk/ttk.py
@@ -153,7 +153,7 @@
def _format_layoutlist(layout, indent=0, indent_size=2):
"""Formats a layout list so we can pass the result to ttk::style
- layout and ttk::style settings. Note that the layout doesn't has to
+ layout and ttk::style settings. Note that the layout doesn't have to
be a list necessarily.
E.g.:
diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py
--- a/Lib/test/test_docxmlrpc.py
+++ b/Lib/test/test_docxmlrpc.py
@@ -153,7 +153,7 @@
@make_request_and_skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
def test_system_methods(self):
- """Test the precense of three consecutive system.* methods.
+ """Test the presence of three consecutive system.* methods.
This also tests their use of parameter type recognition and the
systems related to that process.
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -299,7 +299,7 @@
"Error raising socket exception.")
def testSendtoErrors(self):
- # Testing that sendto doesn't masks failures. See #10169.
+ # Testing that sendto doesn't mask failures. See #10169.
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.addCleanup(s.close)
s.bind(('', 0))
diff --git a/Misc/HISTORY b/Misc/HISTORY
--- a/Misc/HISTORY
+++ b/Misc/HISTORY
@@ -13058,7 +13058,7 @@
- The traceback.py module has a new function tb_lineno() by Marc-Andre
Lemburg which extracts the line number from the linenumber table in
-the code object. Apparently the traceback object doesn't contains the
+the code object. Apparently the traceback object doesn't contain the
right linenumber when -O is used. Rather than guessing whether -O is
on or off, the module itself uses tb_lineno() unconditionally.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -3506,7 +3506,7 @@
- Issue #14157: Fix time.strptime failing without a year on February 29th.
Patch by Hynek Schlawack.
-- Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'.
+- Issue #14768: os.path.expanduser('~/a') doesn't work correctly when HOME is '/'.
- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running
step. Patch by Xavier de Gaye.
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -901,7 +901,7 @@
fputc(quote, fp);
for (i = 0; i < str_len; i++) {
/* Since strings are immutable and the caller should have a
- reference, accessing the interal buffer should not be an issue
+ reference, accessing the internal buffer should not be an issue
with the GIL released. */
c = op->ob_sval[i];
if (c == quote || c == '\\')
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1379,7 +1379,7 @@
The next three properties are the 3 constraints in "C3".
- Local precendece order.
+ Local precedence order.
If A precedes B in C's MRO, then A will precede B in the MRO of all
subclasses of C.
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -136,7 +136,7 @@
class StructVisitor(EmitVisitor):
- """Visitor to generate typdefs for AST."""
+ """Visitor to generate typedefs for AST."""
def visitModule(self, mod):
for dfn in mod.dfns:
diff --git a/Python/ast.c b/Python/ast.c
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -2179,7 +2179,7 @@
testlist: test (',' test)* [',']
augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^='
| '<<=' | '>>=' | '**=' | '//='
- test: ... here starts the operator precendence dance
+ test: ... here starts the operator precedence dance
*/
if (NCH(n) == 1) {
diff --git a/Tools/i18n/pygettext.py b/Tools/i18n/pygettext.py
--- a/Tools/i18n/pygettext.py
+++ b/Tools/i18n/pygettext.py
@@ -482,7 +482,7 @@
'# File: %(filename)s, line: %(lineno)d') % d
elif options.locationstyle == options.GNU:
# fit as many locations on one line, as long as the
- # resulting line length doesn't exceeds 'options.width'
+ # resulting line length doesn't exceed 'options.width'
locline = '#:'
for filename, lineno in v:
d = {'filename': filename, 'lineno': lineno}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list