Stefan Krah <ste...@bytereef.org> added the comment:

Python lists don't implement extended slices, try numpy arrays:

>>> import numpy as np
>>> x = array([[1,2,3], [4,5,6]])
>>> x[:, 2]
array([3, 6])
>>> 
>>> lst = [[1,2,3], [4,5,6]]
>>> lst[:, 2]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list indices must be integers or slices, not tuple
>>> 

Was there any issue apart from the extended slices?

----------
nosy: +skrah

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32288>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to