[issue10324] Modules/binascii.c: simplify expressions

2010-11-09 Thread Senthil Kumaran
Senthil Kumaran added the comment: At first, I was worried if this simplification would cause any harm to readability of the algorithm. Fortunately, it didn't. Committed in r86357. -- nosy: +orsenthil resolution: -> fixed stage: commit review -> committed/rejected status: open -> clo

[issue10324] Modules/binascii.c: simplify expressions

2010-11-06 Thread Nicolas Kaiser
Nicolas Kaiser added the comment: Sorry, found it - with patched builds of Python 2.6.5 and 3.1.2: python2.6 test_binascii.py test_base64invalid (__main__.BinASCIITest) ... ok test_base64valid (__main__.BinASCIITest) ... ok test_crc32 (__main__.BinASCIITest) ... ok test_empty_string (__main__.B

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: test_binascii.py -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Nicolas Kaiser
Nicolas Kaiser added the comment: That's ./Lib/test/test_unittest.py? With patched builds of Python 2.6.5 and 3.1.2: -- Ran 126 tests in 0.015s OK -- Ran 18

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: As near as I can tell, since && and || are logical rather than bitwise, and since the variable reference 'quotetabs' has no side effect, you are correct. Have you run the unittest on a patched build? -- nosy: +terry.reedy stage: -> commit review type

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Nicolas Kaiser
Changes by Nicolas Kaiser : -- keywords: +patch Added file: http://bugs.python.org/file19504/python-binascii.diff ___ Python tracker ___ _

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Nicolas Kaiser
New submission from Nicolas Kaiser : Hi there! I noticed two expressions that can be simplified like: (a || (!a && b)) => (a || b) Best regards, Nicolas Kaiser --- --- a/Modules/binascii.c2010-11-05 13:21:22.075303326 +0100 +++ b/Modules/binascii.c2010-11-05 13:24:16.986174756