On 29/03/2016 23:29, Marco Sulla via Python-list wrote:

Let me add that an items() and keys() for sequences will be also
useful for day-by-day programming, since they will be a shortcut for
enumerate(seq) and range(len(seq))


I cannot remember the last time I needed range(len(seq)) so I don't see how it can be "useful for day-by-day programming". There is usually a more Pythonic way of doing things. You need to get adjacent elements from a sequence? Use the pairwise recipe from https://docs.python.org/3/library/itertools.html.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to