[New-bugs-announce] [issue46527] enumerate no longer accepts iterable keyword argument
Trey Hunner
report at bugs.python.org
Tue Jan 25 20:14:56 EST 2022
New submission from Trey Hunner <trey at truthful.technology>:
While playing around with the main CPython branch against I noticed that enumerate now gives a strange error message when `iterable` is provided as a keyword argument:
>>> enumerate(iterable=[])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: enumerate() missing required argument 'iterable'
When passing an invalid keyword argument (and no positional arguments) an interesting error message is also given:
>>> enumerate(hello="world")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: enumerate() missing required argument 'iterable'
The help output still shows that iterable is accepted as either a keyword argument or a positional argument.
----------
components: Library (Lib)
messages: 411695
nosy: trey
priority: normal
severity: normal
status: open
title: enumerate no longer accepts iterable keyword argument
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46527>
_______________________________________
More information about the New-bugs-announce
mailing list