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 xmorel
Recipients serhiy.storchaka, xmorel
Date 2021-08-07.15:19:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628349586.87.0.922007185483.issue43526@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2021-08-07 15:19:46xmorelsetrecipients: + xmorel, serhiy.storchaka
2021-08-07 15:19:46xmorelsetmessageid: <1628349586.87.0.922007185483.issue43526@roundup.psfhosted.org>
2021-08-07 15:19:46xmorellinkissue43526 messages
2021-08-07 15:19:46xmorelcreate