Possible to slice a string with unpacked tuple?

Benjamin Peterson benjamin at python.org
Sat Jan 24 19:14:26 EST 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