22.06.19 01:08, Daniel Holth пише:
Thanks. I think I might like an option to disable str(bytes) without
disabling str != bytes. Unless the second operation would also corrupt
output.
Came across this kind of set in the hyper http library which uses a set
to accept certain headers with either str or bytes keys.
Does that library support Python 2? If it is true than you have a
problem, because u'abc' == b'abc' in Python 2 and u'abc' != b'abc' in
Python 3.
If it is Python 3 only, you can just ignore BytesWarning. It was added
purely to help to catch subtle bugs in transition to Python 3. In
future, after Python 2 be out of use, BytesWarning will become deprecated.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/L5SQHKPGOBNL5FCWP4HTAOXW2KZ47ME2/