Jonathan Livni <jonathan.li...@gmail.com> added the comment:

Another note - the original problematic code looks like this:

def non_decreasing(L):
    return all(x<=y for x, y in zip(L, L[1:]))

Changing it to:

def non_decreasing(L):
    def f(L):
        return [x<=y for x, y in zip(L, L[1:])]
    return all(f(L))    

also worked around the bug

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11221>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to