https://www.mediawiki.org/wiki/Manual:Pywikibot/Development/Guidelines#Miscellaneous says: " Prefer f-strings over string.format(). Modulo operator % for string formatting should be avoided."
I tried to rewrite a modulo-formatted regex to f-string, but than realized, that in f-strings all curly braces must be doubled, which makes regexes very hard to read and easy to misspell. What is the best practice when you substitute a variable into a regex? -- Bináris
_______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/MEBKKQUONDOPCKOMW6XM6XHFNPPKNCDB/ To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org