On 2018-06-25, Alister <alister@1> wrote:
> for i in range(len(list)): is a python anti-pattern it is almost a 100%
> guarantee that you are doing something wrong*
>
> *as with all rules of thumb there is probably at least 1
> exception that the python experts will now point out.

When you need look-ahead or similar inspection of more than the
current item. An alternative is a custom generator or iterator
that provides the window you need.

-- 
Neil Cerutti

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

Reply via email to