Author Jonathan.Livni
Recipients Jonathan.Livni
Date 2011-02-16.08:31:38
SpamBayes Score 6.76717e-05
Marked as misclassified No
Message-id <>
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.
Date User Action Args
2011-02-16 08:31:39Jonathan.Livnisetrecipients: + Jonathan.Livni
2011-02-16 08:31:39Jonathan.Livnisetmessageid: <>
2011-02-16 08:31:38Jonathan.Livnilinkissue11221 messages
2011-02-16 08:31:38Jonathan.Livnicreate