Skip to content

Commit 37738f4

Browse files
committed
address review: reuse array.typecodes
1 parent caa484b commit 37738f4

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎Lib/test/test_array.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class ArraySubclassWithKwargs(array.array):
2626
def__init__(self, typecode, newarg=None):
2727
array.array.__init__(self)
2828

29-
typecodes= (
30-
'w', 'b', 'B', 'h', 'H', 'i', 'I', 'l', 'L',
31-
'f', 'd', 'q', 'Q', 'e', 'Zf', 'Zd')
29+
typecodes=array.typecodes
3230

3331

3432
classMiscTest(unittest.TestCase):

‎Lib/test/test_re.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,7 @@ def test_bug_6561(self):
17831783
deftest_empty_array(self):
17841784
# SF buf 1647541
17851785
importarray
1786-
fortypecodein'bBhwHiIlLfd':
1786+
fortypecodeinarray.typecodes:
17871787
a=array.array(typecode)
17881788
self.assertIsNone(re.compile(b"bla").match(a))
17891789
self.assertEqual(re.compile(b"").match(a).groups(), ())

0 commit comments

Comments
 (0)