2018-04-29 17:52 GMT+03:00 MRAB <python@mrabarnett.plus.com>:

How about these:

    local m1, m2:
        m1 = regexp1.match(line)
        m2 = regexp2.match(line):
        if m1 and m2:
            ...

Is it possible to do the same thing, but with the help of `with` statement:

with local('m1', 'm2'):
m1 = regex1.match(line)
m2 = regex2.match(line)
if m1 and m2:
...
 
With kind regards,
-gdg