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 christian.heimes
Recipients barry, christian.heimes
Date 2008-09-28.11:32:55
SpamBayes Score 3.649205e-09
Marked as misclassified No
Message-id <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za>
In-reply-to
Content
In byte warning mode (-b or -bb command line argument) b'' == '' raises
an exception but b'' != '' doesn't.

./python -bb
>>> b'' == ''
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
BytesWarning: Comparison between bytes and string
>>> b'' != ''
True

I can't recall why I implemented the byte warning mode this way. But
nowadays I think it could hide bugs in code like "while egg != ''" where
egg is a byte instance.
History
Date User Action Args
2008-09-28 11:32:57christian.heimessetrecipients: + christian.heimes, barry
2008-09-28 11:32:57christian.heimessetmessageid: <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za>
2008-09-28 11:32:55christian.heimeslinkissue3988 messages
2008-09-28 11:32:55christian.heimescreate