Xavier Morel <xavier.mo...@masklinn.net> added the comment:

> I am not against documenting the behavior of -b and BytesWarning clearly. I 
> don't think that anyone would be against. Just somebody have to provide a PR.

Right but what about the ability to enable warning on stringification without 
enabling the warning on comparison? There are packages / situations where 
comparing strings and bytes makes a lot of sense (e.g. use string and byte 
versions of data as keys in the same dict), but I think stringifying bytes 
rarely if ever does.

> Explicitly repr-ing a bytes instance does not produce a warning, and never 
> produced, so I don't understand what do you mean.

Well that's absolutely ideal as I did not check if it did, just wanted to be 
clear that I wasn't looking for a warning in that case.

----------

_______________________________________
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