
9 Sep
2021
9 Sep
'21
3:07 p.m.
Steven D'Aprano wrote:
TIL :-) How have I never noticed to_bytes until now? o_O
I’m going to go out on a limb here: because it’s rarely ever needed?
I mean, the proposed bchr() functionality is crazy simple to implement yourself if you actually *do* need it. You can even get creative and use the dedicated “pistol” operator:
b = b"*" i ,= b i
42
;)
Brandt