Message377670
f-strings are indeed evaluated when the value of the string is needed. Your example is equivalent to:
>>> re.sub(r'([a-z]+)', fr"\112345", 'something')
'J345'
As always with regexes, you need to be careful when dynamically composing them. |
|
Date |
User |
Action |
Args |
2020-09-29 15:19:39 | eric.smith | set | recipients:
+ eric.smith, paul.moore, tim.golden, ezio.melotti, mrabarnett, zach.ware, steve.dower, dkreeft |
2020-09-29 15:19:39 | eric.smith | set | messageid: <1601392779.71.0.579896138723.issue41885@roundup.psfhosted.org> |
2020-09-29 15:19:39 | eric.smith | link | issue41885 messages |
2020-09-29 15:19:39 | eric.smith | create | |
|