New submission from Jonathan Livni <jonathan.li...@gmail.com>: all( (x<=y) for x,y in zip(L, L[1:]) ) all([(x<=y) for x,y in zip(L, L[1:])])
Both lines of code above check if L is a non-decreasing list. Both should return the same results. But under some conditions, they don't. I've encountered this with a list of Decimal numbers. This is 100% reproducible on my Win7 64bit vanilla Python 2.6.6 32bit setup, alas I cannot share the specific code that generates this difference. See attached screenshot from Eclipse Pydev debugger. ---------- components: Windows files: Eclipse.JPG messages: 128628 nosy: Jonathan.Livni priority: normal severity: normal status: open title: all() returns wrong result when the parameters are non-encapsulated list-comprehension versions: Python 2.6 Added file: http://bugs.python.org/file20766/Eclipse.JPG _______________________________________ 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