New submission from wyz23x2 <wyz2...@163.com>:

>>> (50,) * 2
(50, 50)
>>> 50, * 2
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
TypeError: 'int' object is not iterable

This message is confusing. It isn't clear that 50.__iter__ is called. 
tuple(50)*2 seems to happen, which isn't expected (at least to regular users). 
Not like "50 * 2," that relates to parsing.

----------
components: Interpreter Core
messages: 378090
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Confusing error message of 50,*2
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41953>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to