Skip to content

Commit 7ac12f6

Browse files
Fix unbalanced square brackets.
1 parent adc4bef commit 7ac12f6

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

Doc/library/stdtypes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,13 +1155,13 @@ Sequence types also support the following methods:
11551155

11561156
Return the total number of occurrences of *value* in *sequence*.
11571157

1158-
.. method:: list.index(value[, start[, stop])
1159-
range.index(value[, start[, stop])
1160-
tuple.index(value[, start[, stop])
1158+
.. method:: list.index(value[, start[, stop]])
1159+
range.index(value[, start[, stop]])
1160+
tuple.index(value[, start[, stop]])
11611161
:no-contents-entry:
11621162
:no-index-entry:
11631163
:no-typesetting:
1164-
.. method:: sequence.index(value[, start[, stop])
1164+
.. method:: sequence.index(value[, start[, stop]])
11651165

11661166
Return the index of the first occurrence of *value* in *sequence*.
11671167

Doc/tutorial/datastructures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ of the methods of list objects:
5858
Remove all items from the list. Similar to ``del a[:]``.
5959

6060

61-
.. method:: list.index(value[, start[, stop])
61+
.. method:: list.index(value[, start[, stop]])
6262
:noindex:
6363

6464
Return zero-based index of the first occurrence of *value* in the list.

Lib/test/test_types.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ def test_names(self):
4545
ignored = {'new_class', 'resolve_bases', 'prepare_class',
4646
'get_original_bases', 'DynamicClassAttribute', 'coroutine'}
4747

48-
for name in c_types.__all__:
49-
if name not in c_only_names | ignored:
50-
self.assertIs(getattr(c_types, name), getattr(py_types, name))
51-
5248
all_names = ignored | {
5349
'AsyncGeneratorType', 'BuiltinFunctionType', 'BuiltinMethodType',
5450
'CapsuleType', 'CellType', 'ClassMethodDescriptorType', 'CodeType',
@@ -61,8 +57,13 @@ def test_names(self):
6157
'NotImplementedType', 'SimpleNamespace', 'TracebackType',
6258
'UnionType', 'WrapperDescriptorType',
6359
}
64-
self.assertEqual(all_names, set(c_types.__all__))
6560
self.assertEqual(all_names - c_only_names, set(py_types.__all__))
61+
if c_types is not None:
62+
self.assertEqual(all_names, set(c_types.__all__))
63+
for name in c_types.__all__:
64+
if name not in c_only_names | ignored:
65+
self.assertIs(getattr(c_types, name), getattr(py_types, name))
66+
6667

6768
def test_truth_values(self):
6869
if None: self.fail('None is true instead of false')

Lib/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# "__iter__" and "__next__" attributes instead.
99

1010
try:
11-
from _types import *
11+
from _ntypes import *
1212
except ImportError:
1313
import sys
1414

Modules/socketmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ listen([n]) -- start listening for incoming connections\n\
151151
recv(buflen[, flags]) -- receive data\n\
152152
recv_into(buffer[, nbytes[, flags]]) -- receive data (into a buffer)\n\
153153
recvfrom(buflen[, flags]) -- receive data and sender\'s address\n\
154-
recvfrom_into(buffer[, nbytes, [, flags])\n\
154+
recvfrom_into(buffer[, nbytes, [, flags]])\n\
155155
-- receive data and sender\'s address (into a buffer)\n\
156156
sendall(data[, flags]) -- send all data\n\
157157
send(data[, flags]) -- send data, may not send all of it\n\

0 commit comments

Comments
 (0)