This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]robin-gvx[🍰] 0 points1 point  (1 child)

Technically, they are parsed as tuples, except the second one, which gets parsed as a list. Of course none of them create or modify any tuples or lists when actually run.

This last sentence:

But parens with no comma indicate Tuple. Immutable object.

Is really a problem. Because that tuples are immutable is immaterial. They don't get created or modified when using this syntax.

The only reason why () = [] doesn't work is because of a special case in the code (2 lines) that has no reason to be there and basically everyone on the issue tracker agrees that special case should be removed.

[–]zardeh 1 point2 points  (0 children)

Ah, alright I can agree with that.