On Sat, Nov 12, 2016 at 9:10 PM David Mertz <me...@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
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/