This snippet was already there, was already discussed, and removed. Python is no flaky php and doesn't allow make glorious errors by using incorrect types for operations. E.g.:

~~~~
>>> a=[1,2,4,4]
>>> a[1.0]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list indices must be integers, not float
~~~~