Re:Python: The Dictionary Playbook
by andreasvc on Thursday January 03, 2013 @03:04AM
(#5001417)
Well I see what you mean but then again a comma looks very much like a period ...
The advantage of this syntax is that : unambiguously introduces a key: value pair, whereas (key, value) could also occur in a list comprehension (e.g., by accident).
The advantage of this syntax is that : unambiguously introduces a key: value pair, whereas (key, value) could also occur in a list comprehension (e.g., by accident).