[Python-Dev] Call for prudence about PEP-572 (original) (raw)
Matěj Cepl mcepl at cepl.eu
Mon Jul 9 03:26:33 EDT 2018
- Previous message (by thread): [Python-Dev] Call for prudence about PEP-572
- Next message (by thread): [Python-Dev] Call for prudence about PEP-572
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: mcepl at 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.
- Previous message (by thread): [Python-Dev] Call for prudence about PEP-572
- Next message (by thread): [Python-Dev] Call for prudence about PEP-572
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]