Message287096
__getitem__ was added to match objects as a resolution of issue24454.
Wouldn't it be nice to also have `__contains__` and `get` methods for match objects? Is it even feasible to implement them in neat way?
They should work similar to dictionaries, i.e:
```
match = re.match('(?P<a>a)', 'a')
match.get('b') # should return None
match.get(1) # should return 'a'
'a' in match # True
'b' in match # False
``` |
|
Date |
User |
Action |
Args |
2017-02-06 08:00:11 | THRlWiTi | set | recipients:
+ THRlWiTi, eric.smith, mrabarnett, serhiy.storchaka |
2017-02-06 08:00:11 | THRlWiTi | set | messageid: <1486368011.75.0.401714465963.issue29459@psf.upfronthosting.co.za> |
2017-02-06 08:00:11 | THRlWiTi | link | issue29459 messages |
2017-02-06 08:00:11 | THRlWiTi | create | |
|