2
eo2875
3y

Python:
TypeError: unsupported operand type(s) for %: 'tuple' and 'dict'

Ugh there's a comma somewhere. I kinda appreciate how easy it is to make a tuple, but at the same time I don't. If there's no value after a comma with only one value behind it, could the linter at least mark it as a warning?

Comments
  • 1
    No, because that is the way of making tuples with one value.
  • 0
    @iiii yeah but requiring you to wrap it in brackets

    (val1, ) # Ok
    val1, val2 # Ok
    val1, # warning, bad style
Add Comment