Posts: 4,646
Threads: 1,493
Joined: Sep 2016
how to do a bytes f-string?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,646
Threads: 1,493
Joined: Sep 2016
i don't follow.
i wanted to do:
x = b'xyzzy'
s = bf'foo{x}bar'
but that is a syntax error.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,646
Threads: 1,493
Joined: Sep 2016
my suggestion is for bytes formatting getting a non-bytes unicode character to raise an exception.
the other thing i have a need for is a non-literal f-string. that is, a way to process a regular string that has contents that would be work in a literal f-string, but do it with that non-literal string value.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.