Message 312016 - Python tracker

Message312016

Author terry.reedy
Recipients dilyan.palauzov, serhiy.storchaka, terry.reedy
Date 2018-02-11.23:09:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518390585.87.0.467229070634.issue32801@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy, Is there any reason to not combine last two lines in one?

-        regex = '(?P<%s>%s' % (directive, regex)
-        return '%s)' % regex
+        return '(?P<%s>%s)' % (directive, regex)

or to use f-string to then get

+        return f'(?P<{directive}>{regex})'
History
Date User Action Args
2018-02-11 23:09:45terry.reedysetrecipients: + terry.reedy, dilyan.palauzov, serhiy.storchaka
2018-02-11 23:09:45terry.reedysetmessageid: <1518390585.87.0.467229070634.issue32801@psf.upfronthosting.co.za>
2018-02-11 23:09:45terry.reedylinkissue32801 messages
2018-02-11 23:09:45terry.reedycreate