Skip to content

Conversation

@alonme
Copy link
Contributor

@alonme alonme commented Nov 1, 2025

@7576457
Copy link

7576457 commented Nov 1, 2025

I was just working on this :)

I was thinking of suggesting something like (as hinted):
"perhaps you missed a comma to separate sequence elements?"

1 Keep “perhaps” -> stays consistent with Python’s style.
2 Add “to separate sequence elements” -> makes it clear that it’s about lists, tuples, function arguments, etc.

@StanFromIreland
Copy link
Member

@alonme In the future, when someone says they are working on something in the issue thread, please don't open a PR.

@alonme
Copy link
Contributor Author

alonme commented Nov 1, 2025

@StanFromIreland Sure, is there a rough guideline to how long after someone "claims" an issue is it okay to try and tackle it?

@StanFromIreland
Copy link
Member

Sure, is there a rough guideline to how long after someone "claims" an issue is it okay to try and tackle it?

I'd recommend you wait at least three weeks, you can always ask.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not only for sequence elements. You get the same warning for set and dict which are not sequences. And for function arguments.

>>> {(1, 2) (3, 4)}
<python-input-0>:1: SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    {(1, 2) (3, 4)}
     ~~~~~~~^^^^^^
TypeError: 'tuple' object is not callable
>>> print((1, 2) (3, 4))
<python-input-1>:1: SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    print((1, 2) (3, 4))
          ~~~~~~~^^^^^^
TypeError: 'tuple' object is not callable

@tadejmagajna
Copy link
Contributor

Given that mentioning "sequence elements" isn't applicable to all scenarios, how about we simply make it generic and end the warning with ...; did you miss a comma to separate elements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants