2018-04-29 17:52 GMT+03:00 MRAB <pyt...@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
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to