mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue #18896: Python function can now have more than 255 parameters.
collections.namedtuple() now supports tuples with more than 255 elements.
This commit is contained in:
parent
14d8b9693b
commit
5bb8b9134b
10 changed files with 33 additions and 49 deletions
|
|
@ -319,8 +319,7 @@ class TestNamedTuple(unittest.TestCase):
|
|||
self.assertEqual(Dot(1)._replace(d=999), (999,))
|
||||
self.assertEqual(Dot(1)._fields, ('d',))
|
||||
|
||||
# n = 5000
|
||||
n = 254 # SyntaxError: more than 255 arguments:
|
||||
n = 5000
|
||||
names = list(set(''.join([choice(string.ascii_letters)
|
||||
for j in range(10)]) for i in range(n)))
|
||||
n = len(names)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue