3 ms·
I use it for simple cases: >>> if m := re.search(r'(.*)s', 'oh!'): ... print(m[1]) ... >>> if m := re.search(r'(.*)s', 'awesome'): ...
by asicsp 4y ago
I use it for simple cases:
>>> if m := re.search(r'(.*)s', 'oh!'):
... print(m[1])
...
>>> if m := re.search(r'(.*)s', 'awesome'):
... print(m[1])
...
awe
- systemvoltage 4y agoThe question one has to ask is whether it is worth the additional complexity and a dedicated operator. I am sure it is ever so slightly useful, but I am not convinced it is worth the trouble. Feature creep is programming language's worse enemy after a certain maturity level. I absolutely love Go in this matter. They took forever to add Generics and generally sides with stability over features.