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 eric.smith
Recipients eric.smith, marnanel, serhiy.storchaka
Date 2018-10-10.22:22:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539210131.92.0.788709270274.issue34955@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-10-10 22:22:11eric.smithsetrecipients: + eric.smith, serhiy.storchaka, marnanel
2018-10-10 22:22:11eric.smithsetmessageid: <1539210131.92.0.788709270274.issue34955@psf.upfronthosting.co.za>
2018-10-10 22:22:11eric.smithlinkissue34955 messages
2018-10-10 22:22:11eric.smithcreate