enhancing slicing

Markus Schaber markus at schabi.de
Sun Aug 26 18:21:04 EDT 2001


Bengt Richter <bokr at accessone.com> schrub:

> I would rather have the alternative syntax
>     a[b:+c]

This is not good as it is already valid at least since python 1.5.2 
with a different meaning (the + unary operator):
>>> list = [1,2,3,4,5,6]
>>> a = 2
>>> b = 3
>>> list[a:+b]
[3]

markus

-- 
1) Customers cause problems.
2) Marketing is trying to create more customers.
Therefore:
3) Marketing is evil.  (Grand Edwards in comp.lang.python)



More information about the Python-list mailing list