Closed
Description
In the svg backend we need to treat generic and specific font names differently. We are currently using repr
to achieve this, but we need to verify that this is robust to if repr goes with single or double quotes and if any of the consumers of svg would care.
We have used
repr()
before and it seems to have worked, but technicallyrepr()
is not exactly quoting. Would both single and double quotes be ok? Unlikely, but in theory Python could change that in repr (or possibly more likely an interpreter other than CPython could use other quotes). Also, can we be sure we will never have byte strings here?It's more defensive to f-string the quotes explicitly.
Originally posted by @timhoffm in #24066 (comment)