STINNER Victor <vstin...@python.org> added the comment:

> If this is intended behaviour, which seems to be the case according to 
> ncoghlan's comment https://bugs.python.org/issue32230#msg307721, it should be 
> clearly documented, as it's rather frustrating.

The -b command line documentation is not explicitly enough?

"Issue a warning when comparing bytes or bytearray with str or bytes with int. 
Issue an error when the option is given twice (-bb)."

https://docs.python.org/dev/using/cmdline.html#cmdoption-b

Modifying warning filters don't change how Python emits or not warnings. It 
only changes how emitted warnings are handlded: ignored, displayed, treated as 
errors.

The relationship between -b and BytesWarning is different than other warnings.

Should we add a note near the BytesWarning documentation?
https://docs.python.org/dev/library/exceptions.html#BytesWarning

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43526>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to