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 nikai
Recipients nikai
Date 2010-11-05.12:31:19
SpamBayes Score 0.11765639
Marked as misclassified No
Message-id <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za>
In-reply-to
Content
Hi there!

I noticed two expressions that can be simplified like:
 (a || (!a && b)) => (a || b)

Best regards,
Nicolas Kaiser
---
--- a/Modules/binascii.c	2010-11-05 13:21:22.075303326 +0100
+++ b/Modules/binascii.c	2010-11-05 13:24:16.986174756 +0100
@@ -1337,8 +1337,7 @@ binascii_b2a_qp (PyObject *self, PyObjec
             ((data[in] == '\t' || data[in] == ' ') && (in + 1 == datalen)) ||
             ((data[in] < 33) &&
              (data[in] != '\r') && (data[in] != '\n') &&
-             (quotetabs ||
-            (!quotetabs && ((data[in] != '\t') && (data[in] != ' '))))))
+             (quotetabs || ((data[in] != '\t') && (data[in] != ' ')))))
         {
             if ((linelen + 3) >= MAXLINESIZE) {
                 linelen = 0;
@@ -1410,8 +1409,7 @@ binascii_b2a_qp (PyObject *self, PyObjec
             ((data[in] == '\t' || data[in] == ' ') && (in + 1 == datalen)) ||
             ((data[in] < 33) &&
              (data[in] != '\r') && (data[in] != '\n') &&
-             (quotetabs ||
-            (!quotetabs && ((data[in] != '\t') && (data[in] != ' '))))))
+             (quotetabs || ((data[in] != '\t') && (data[in] != ' ')))))
         {
             if ((linelen + 3 )>= MAXLINESIZE) {
                 odata[out++] = '=';
History
Date User Action Args
2010-11-05 12:31:22nikaisetrecipients: + nikai
2010-11-05 12:31:22nikaisetmessageid: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za>
2010-11-05 12:31:20nikailinkissue10324 messages
2010-11-05 12:31:19nikaicreate