Re: Assertions that are always true

2012-05-29 Thread Barry Warsaw
On May 28, 2012, at 12:33 AM, Jakub Wilk wrote: >It's a mistake to write > > assert(tilsit, 'Never at the end of the week, sir.') > >instead of > > assert tilsit, 'Never at the end of the week, sir.' > >The former assertion is always true, and thus no-op. Python >= 2.6 emits a >SyntaxWar

Assertions that are always true

2012-05-27 Thread Jakub Wilk
It's a mistake to write assert(tilsit, 'Never at the end of the week, sir.') instead of assert tilsit, 'Never at the end of the week, sir.' The former assertion is always true, and thus no-op. Python >= 2.6 emits a SyntaxWarning about this. I implemented lintian4python check for s