On 2018-07-07, 15:48 GMT, Guido van Rossum wrote:
>     if validate(name := re.search(pattern, line).group(1)):
>         return name

Except there is no error handling for situations when 
re.search() returns None, so one shouldn't use it anyway (most 
of the time). Which seems to me like another nice example why 
one should stay away from this style as much as possible. I am 
too lazy to be tempted into this 
nice-example-terrible-production-code world.

Best,

Matěj
-- 
https://matej.ceplovi.cz/blog/, Jabber: mc...@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety.
    -- Benjamin Franklin, Historical Review
       of Pennsylvania, 1759.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to