
Sept. 9, 2021
2: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