A question purely for curiosity\'s sake. This is obviously invalid syntax:
foo = {} foo[\'bar\': \'baz\']
It\'s obvious what happened, the
Using the colon in an indexing operation generates a slice object, which is not hashable.