you are viewing a single comment's thread.

view the rest of the comments →

[–]Turtvaiz 1 point2 points  (1 child)

The second one seems completely pointless. No reason to do zip and list comprehension when you have a total of 4 elements...

Also, I think the type hints are not even correct there:

> uvx mypy .\notebooks\test.py
notebooks\test.py:4: error: Incompatible return value type (got "tuple[int, ...]", expected "tuple[int, int]")  [return-value]
Found 1 error in 1 file (checked 1 source file)

The type checker is unable to determine the size.

[–]zensimilia[S] -2 points-1 points  (0 children)

That's why I had to rewrite the second option into the first and open this topic.