[Python-3000] easy int to bytes conversion similar to chr?

Gregory P. Smith greg at electricrain.com
Thu Aug 23 08:12:32 CEST 2007


Is there anything similar to chr(65) for creating a single byte string
that doesn't involve creating an intermediate string or tuple object?
 bytes(chr(65))
 bytes((65,))
both seem slightly weird.
Greg


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /