enhancing slicing
Will Ware
wware at world.std.com
Thu Aug 23 10:19:19 EDT 2001
gbreed at cix.compulink.co.uk wrote:
> I'm not sure the the :][: operator would be appropriate here, but maybe
> the variation v[:5 ][ -2:] could be made to work. [Talk of statring a PEP]
This can be made to work in Python 1.5.2:
>>> v = "abcdefgh"
>>> print v[:5 ][ -2:]
de
To start a PEP for this change, you'll need to borrow Guido's time machine.
--
-----------------------------------+---------------------
22nd century: Esperanto, geodesic | Will Ware
domes, hovercrafts, metric system | wware at world.std.com
More information about the Python-list
mailing list