PEP 750: Tag Strings For Writing Domain-Specific Languages

Apologies in advance, I haven’t been following this closely.

But hopefully it is a straight forward question.

I see that string-prefixes are being specialised for formatting only.

However, will it be possible to get the raw string?

as per example in jupyterlite:

def greet(*args):
    print(args)

greet"Hello ?? {a:1}"    # (DecodedConcrete('Hello ?? '), InterpolationConcrete(...))

However, what if I don’t need to format, all I need is syntactic convenience. I.e.:

def greet(string):
    print(string)

greet"Hello ?? {a:1}"    # "Hello ?? {a:1}"

Wouldn’t it be good (if it is not possible by current plan) to not limit this to string formatting, but have a more general pass-through layer first, which is then specialised to string formatting?