Python slicing looks really weird. How do I explain *s=list(range(100));
s[10:20]  *gives you a part of the list.
Can we have an extra function for lists and string (and wherever slicing
works) to explicitly mention that we're slicing?? Something like -
*s=list(range(100));
s.slice(10, 20).*

Has this been mentioned before? What would be a drawback of having
something more readable like a *.slice* function? Would love to know your
thoughts.

PS: Explicit is better than Implicit :)
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/YYSBGARYNEPJ5IZAIZYDKCIUNDG3EXHZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to