Possible to slice a string with unpacked tuple?

Benjamin Peterson benjamin at python.org
Sun Jan 25 01:14:26 CET 2009

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.

More information about the Python-list mailing list