Benjamin Peterson wrote:
MRAB <google <at> mrabarnett.plus.com> writes:
Does myString[myTuple[0] : myTuple[1]] count as unpacking? If it does, then how about myString.__getslice__(*myTuple)?

Please don't use special method names directly and especially not
__getslice__(). It's deprecated and will be removed.

It is gone in 3.0.  In 3.0, at least, and perhaps later 2.x (not sure)
the OP should simply write
   myString[slice(*myTuple)]
which is the semantic equivalent of
   myString[myTuple[0]:myTuple[1]]

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to