It seems that python allow to combine r'string and b'string together. But not f'string and b'string !
classic usage:
>>> name='john'
>>> print(f'hello {name}')
hello john
with bytes and f'string:
Try 1:
>>> name=b'john'
>>> print(fb'hello {name}')
File "<stdin>", line 1
print(fb'hello {name}')
^
SyntaxError: invalid syntax
Try 2:
>>> print(f'hello {name}')
hello b'john'
So it seems that I need to perform 2 extra computation per lines
- bin -> ascii
- f'string
- ascii -> bin
Is there a better approach ? Is it possible to combine f'string with bytes'string ?
Thanks best regards