Terry J. Reedy <[email protected]> added the comment:
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})'
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32801>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com