This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jonathan.Livni
Recipients Jonathan.Livni
Date 2011-02-16.08:31:38
SpamBayes Score 6.767165e-05
Marked as misclassified No
Message-id <1297845099.14.0.722609580039.issue11221@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-02-16 08:31:39Jonathan.Livnisetrecipients: + Jonathan.Livni
2011-02-16 08:31:39Jonathan.Livnisetmessageid: <1297845099.14.0.722609580039.issue11221@psf.upfronthosting.co.za>
2011-02-16 08:31:38Jonathan.Livnilinkissue11221 messages
2011-02-16 08:31:38Jonathan.Livnicreate