
Nov. 12, 2016
7:20 p.m.
On Sat, Nov 12, 2016 at 9:10 PM David Mertz <mertz@gnosis.cx> wrote:
dfmi.loc[slice[:,:,['C1','C3']], slice[:,'foo']]
I like the change proposed to `str(slice(10))` also... and it would be way better if `slice[:10]` were actual "syntax." In fact, in that case it could even be the repr().
Indexing operator for classes already has a meaning, for generic types. It is a possibility that slice will become a generic type (see here: https://github.com/python/mypy/issues/2410#issuecomment-258898836) and this syntax will make it either impossible or require Slice[] to be different from slice[] in a potentially confusing way. Elazar