New submission from Trey Hunner <trey@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue46527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to