Eric V. Smith <e...@trueblade.com> added the comment:
You can in fact pass a dict to bytes(), as long as the keys are ints in the correct range: >>> bytes({0:10, 1:20}) b'\x00\x01' I'm not claiming it's very useful, but it does conform to the docs. I'm not sure the error message can be improved, so I suggest closing this issue. ---------- nosy: +eric.smith _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34955> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com