summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-04-15 02:27:11 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-04-15 02:27:11 +0000
commitcda80940ed444d01beed797dcd86c207f11104bc (patch)
tree7beaa1c4db9c2e8351a9cf8ddda6a656900d4275 /Lib
parent8ca020e1cc2590472ba83611727ae20d9f34bfe5 (diff)
parent20d325574eaa4f2a88036eac81e8d3cf9135372f (diff)
downloadcpython-git-cda80940ed444d01beed797dcd86c207f11104bc.tar.gz
Issue #15984: Merge PyUnicode doc from 3.5
Diffstat (limited to 'Lib')
-rw-r--r--Lib/asyncio/windows_events.py2
-rw-r--r--Lib/email/utils.py2
-rw-r--r--Lib/heapq.py2
-rw-r--r--Lib/nntplib.py8
-rw-r--r--Lib/ntpath.py2
-rw-r--r--Lib/test/test_codecs.py2
-rw-r--r--Lib/test/test_multibytecodec.py4
-rw-r--r--Lib/test/test_nntplib.py2
-rw-r--r--Lib/test/test_unicode.py2
-rw-r--r--Lib/test/test_zlib.py2
10 files changed, 14 insertions, 14 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 922594f172..7be3e02232 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 5080d81909..a759d23308 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 07af37e717..0b3e89a3a9 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 a75faade14..28cd0992dd 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 9cc5ca738d..af6a7091f9 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 4740b682aa..df8f961f96 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -2401,7 +2401,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 2929f988a8..8d7a213c16 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 3c69c3e51e..994532b61e 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 ab263ab1ec..a38e7b1610 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 ca30116f08..0978b79d2b 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -175,7 +175,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",