diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-04-15 02:14:19 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-04-15 02:14:19 (GMT) |
commit | 6245cb3c015a5b9febef4d6ef30d3acfc762a79d (patch) | |
tree | 3e0a3907968edb89a7d24a051dab35c9a43f5dee /Lib | |
parent | 7d82d0366bb6c1b175cf54cf87778bba2451b0f4 (diff) | |
download | cpython-6245cb3c015a5b9febef4d6ef30d3acfc762a79d.zip cpython-6245cb3c015a5b9febef4d6ef30d3acfc762a79d.tar.gz cpython-6245cb3c015a5b9febef4d6ef30d3acfc762a79d.tar.bz2 |
Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
This affects documentation, code comments, and a debugging messages.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncio/windows_events.py | 2 | ||||
-rw-r--r-- | Lib/email/utils.py | 2 | ||||
-rw-r--r-- | Lib/heapq.py | 2 | ||||
-rw-r--r-- | Lib/nntplib.py | 8 | ||||
-rw-r--r-- | Lib/ntpath.py | 2 | ||||
-rw-r--r-- | Lib/test/test_codecs.py | 2 | ||||
-rw-r--r-- | Lib/test/test_multibytecodec.py | 4 | ||||
-rw-r--r-- | Lib/test/test_nntplib.py | 2 | ||||
-rw-r--r-- | Lib/test/test_unicode.py | 2 | ||||
-rw-r--r-- | Lib/test/test_zlib.py | 2 |
10 files changed, 14 insertions, 14 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py index 922594f..7be3e02 100644 --- a/Lib/asyncio/windows_events.py +++ b/Lib/asyncio/windows_events.py @@ -197,7 +197,7 @@ class _WaitHandleFuture(_BaseWaitHandleFuture): # # If the IocpProactor already received the event, it's safe to call # _unregister() because we kept a reference to the Overlapped object - # which is used as an unique key. + # which is used as a unique key. self._proactor._unregister(self._ov) self._proactor = None diff --git a/Lib/email/utils.py b/Lib/email/utils.py index 5080d81..a759d23 100644 --- a/Lib/email/utils.py +++ b/Lib/email/utils.py @@ -87,7 +87,7 @@ def formataddr(pair, charset='utf-8'): 'utf-8'. """ name, address = pair - # The address MUST (per RFC) be ascii, so raise an UnicodeError if it isn't. + # The address MUST (per RFC) be ascii, so raise a UnicodeError if it isn't. address.encode('ascii') if name: try: diff --git a/Lib/heapq.py b/Lib/heapq.py index 07af37e..0b3e89a 100644 --- a/Lib/heapq.py +++ b/Lib/heapq.py @@ -54,7 +54,7 @@ representation for a tournament. The numbers below are `k', not a[k]: In the tree above, each cell `k' is topping `2*k+1' and `2*k+2'. In -an usual binary tournament we see in sports, each cell is the winner +a usual binary tournament we see in sports, each cell is the winner over the two cells it tops, and we can trace the winner down the tree to see all opponents s/he had. However, in many computer applications of such tournaments, we do not need to trace the history of a winner. diff --git a/Lib/nntplib.py b/Lib/nntplib.py index a75faad..28cd099 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -165,7 +165,7 @@ ArticleInfo = collections.namedtuple('ArticleInfo', # Helper function(s) def decode_header(header_str): - """Takes an unicode string representing a munged header value + """Takes a unicode string representing a munged header value and decodes it as a (possibly non-ASCII) readable value.""" parts = [] for v, enc in _email_decode_header(header_str): @@ -420,7 +420,7 @@ class _NNTPBase: def _putcmd(self, line): """Internal: send one command to the server (through _putline()). - The `line` must be an unicode string.""" + The `line` must be a unicode string.""" if self.debugging: print('*cmd*', repr(line)) line = line.encode(self.encoding, self.errors) self._putline(line) @@ -445,7 +445,7 @@ class _NNTPBase: def _getresp(self): """Internal: get a response from the server. Raise various errors if the response indicates an error. - Returns an unicode string.""" + Returns a unicode string.""" resp = self._getline() if self.debugging: print('*resp*', repr(resp)) resp = resp.decode(self.encoding, self.errors) @@ -462,7 +462,7 @@ class _NNTPBase: """Internal: get a response plus following text from the server. Raise various errors if the response indicates an error. - Returns a (response, lines) tuple where `response` is an unicode + Returns a (response, lines) tuple where `response` is a unicode string and `lines` is a list of bytes objects. If `file` is a file-like object, it must be open in binary mode. """ diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 9cc5ca7..af6a709 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -177,7 +177,7 @@ def splitunc(p): Return a 2-tuple (unc, rest); either part may be empty. If unc is not empty, it has the form '//host/mount' (or similar using backslashes). unc+rest is always the input path. - Paths containing drive letters never have an UNC part. + Paths containing drive letters never have a UNC part. """ import warnings warnings.warn("ntpath.splitunc is deprecated, use ntpath.splitdrive instead", diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index b93e0ab..c98afea 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -2355,7 +2355,7 @@ class TypesTest(unittest.TestCase): self.assertRaises(TypeError, decoder, "xxx") def test_unicode_escape(self): - # Escape-decoding an unicode string is supported ang gives the same + # Escape-decoding a unicode string is supported ang gives the same # result as decoding the equivalent ASCII bytes string. self.assertEqual(codecs.unicode_escape_decode(r"\u1234"), ("\u1234", 6)) self.assertEqual(codecs.unicode_escape_decode(br"\u1234"), ("\u1234", 6)) diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py index 2929f98..8d7a213 100644 --- a/Lib/test/test_multibytecodec.py +++ b/Lib/test/test_multibytecodec.py @@ -67,7 +67,7 @@ class Test_MultibyteCodec(unittest.TestCase): _multibytecodec.MultibyteStreamWriter, None) def test_decode_unicode(self): - # Trying to decode an unicode string should raise a TypeError + # Trying to decode a unicode string should raise a TypeError for enc in ALL_CJKENCODINGS: self.assertRaises(TypeError, codecs.getdecoder(enc), "") @@ -160,7 +160,7 @@ class Test_IncrementalDecoder(unittest.TestCase): self.assertEqual(decoder.decode(b'B@$'), '\u4e16') def test_decode_unicode(self): - # Trying to decode an unicode string should raise a TypeError + # Trying to decode a unicode string should raise a TypeError for enc in ALL_CJKENCODINGS: decoder = codecs.getincrementaldecoder(enc)() self.assertRaises(TypeError, decoder.decode, "") diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 3c69c3e..994532b 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -609,7 +609,7 @@ class NNTPv1Handler: "\t\t6683\t16" "\t" "\n" - # An UTF-8 overview line from fr.comp.lang.python + # A UTF-8 overview line from fr.comp.lang.python "59\tRe: Message d'erreur incompréhensible (par moi)" "\tEric Brunel <eric.brunel@pragmadev.nospam.com>" "\tWed, 15 Sep 2010 18:09:15 +0200" diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index ab263ab..a38e7b1 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -1774,7 +1774,7 @@ class UnicodeTest(string_tests.CommonTest, def assertCorrectUTF8Decoding(self, seq, res, err): """ - Check that an invalid UTF-8 sequence raises an UnicodeDecodeError when + Check that an invalid UTF-8 sequence raises a UnicodeDecodeError when 'strict' is used, returns res when 'replace' is used, and that doesn't return anything when 'ignore' is used. """ diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index ecdb5a7..1cafcb5 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -171,7 +171,7 @@ class CompressTestCase(BaseCompressTestCase, unittest.TestCase): self.assertEqual(zlib.decompress(ob), data) def test_incomplete_stream(self): - # An useful error message is given + # A useful error message is given x = zlib.compress(HAMLET_SCENE) self.assertRaisesRegex(zlib.error, "Error -5 while decompressing data: incomplete or truncated stream", |