Skip to content

Commit 119e502

Browse files
committed
Fix typos in code comments and documentation
1 parent 00ccacc commit 119e502

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Doc/library/argparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ the various :class:`ArgumentParser` actions. The two most common uses of it are
923923
See the nargs_ description for examples.
924924

925925
With the ``'store_const'`` and ``'append_const'`` actions, the ``const``
926-
keyword argument must be given. For other actions, is defaults to ``None``.
926+
keyword argument must be given. For other actions, it defaults to ``None``.
927927

928928

929929
default

Doc/whatsnew/2.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ Some of the changes to Python's build process and to the C API are:
14811481

14821482
* Python can now be built with additional profiling for the interpreter itself,
14831483
intended as an aid to people developing the Python core. Providing
1484-
:option:`----enable-profiling` to the :program:`configure` script will let you
1484+
:option:`--enable-profiling` to the :program:`configure` script will let you
14851485
profile the interpreter with :program:`gprof`, and providing the
14861486
:option:`--with-tsc` switch enables profiling using the Pentium's Time-Stamp-
14871487
Counter register. Note that the :option:`--with-tsc` switch is slightly

Lib/posixpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def realpath(filename):
372372
path, ok = _joinrealpath(filename[:0], filename, {})
373373
return abspath(path)
374374

375-
# Join two paths, normalizing ang eliminating any symbolic links
375+
# Join two paths, normalizing and eliminating any symbolic links
376376
# encountered in the second path.
377377
def _joinrealpath(path, rest, seen):
378378
if isinstance(path, bytes):

Lib/test/test_codecs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,7 @@ def test_decode_unicode(self):
23552355
self.assertRaises(TypeError, decoder, "xxx")
23562356

23572357
def test_unicode_escape(self):
2358-
# Escape-decoding a unicode string is supported ang gives the same
2358+
# Escape-decoding a unicode string is supported and gives the same
23592359
# result as decoding the equivalent ASCII bytes string.
23602360
self.assertEqual(codecs.unicode_escape_decode(r"\u1234"), ("\u1234", 6))
23612361
self.assertEqual(codecs.unicode_escape_decode(br"\u1234"), ("\u1234", 6))
@@ -2762,7 +2762,7 @@ def test_uu_invalid(self):
27622762
# type and a single str argument.
27632763

27642764
# Use a local codec registry to avoid appearing to leak objects when
2765-
# registering multiple seach functions
2765+
# registering multiple search functions
27662766
_TEST_CODECS = {}
27672767

27682768
def _get_test_codec(codec_name):

Modules/_io/bytesio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,12 +551,12 @@ _io.BytesIO.readinto
551551
Read up to len(buffer) bytes into buffer.
552552
553553
Returns number of bytes read (0 for EOF), or None if the object
554-
is set not to block as has no data to read.
554+
is set not to block and has no data to read.
555555
[clinic start generated code]*/
556556

557557
static PyObject *
558558
_io_BytesIO_readinto_impl(bytesio *self, Py_buffer *buffer)
559-
/*[clinic end generated code: output=a5d407217dcf0639 input=71581f32635c3a31]*/
559+
/*[clinic end generated code: output=a5d407217dcf0639 input=b52a8782706f0037]*/
560560
{
561561
Py_ssize_t len, n;
562562

Modules/_io/clinic/bytesio.c.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ PyDoc_STRVAR(_io_BytesIO_readinto__doc__,
262262
"Read up to len(buffer) bytes into buffer.\n"
263263
"\n"
264264
"Returns number of bytes read (0 for EOF), or None if the object\n"
265-
"is set not to block as has no data to read.");
265+
"is set not to block and has no data to read.");
266266

267267
#define _IO_BYTESIO_READINTO_METHODDEF \
268268
{"readinto", (PyCFunction)_io_BytesIO_readinto, METH_O, _io_BytesIO_readinto__doc__},
@@ -419,4 +419,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
419419
exit:
420420
return return_value;
421421
}
422-
/*[clinic end generated code: output=500ccc149587fac4 input=a9049054013a1b77]*/
422+
/*[clinic end generated code: output=164cf0e4117dadbe input=a9049054013a1b77]*/

0 commit comments

Comments
 (0)