[issue10324] Modules/binascii.c: simplify expressions

2010-11-09 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com 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

[issue10324] Modules/binascii.c: simplify expressions

2010-11-06 Thread Nicolas Kaiser
Nicolas Kaiser ni...@nikai.net 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

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Nicolas Kaiser
New submission from Nicolas Kaiser ni...@nikai.net: 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

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Nicolas Kaiser
Changes by Nicolas Kaiser ni...@nikai.net: -- keywords: +patch Added file: http://bugs.python.org/file19504/python-binascii.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10324 ___

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu 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: -

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Nicolas Kaiser
Nicolas Kaiser ni...@nikai.net 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

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: test_binascii.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10324 ___ ___