| 1588 | return None |
| 1589 | |
| 1590 | class MatchResult: |
| 1591 | def __init__(self, matches, bindings=None, keys=None): |
| 1592 | self.__dict__.update(bindings or {}) |
| 1593 | self._matches = matches |
| 1594 | self._keys = keys or [] |
| 1595 | |
| 1596 | def __bool__(self): |
| 1597 | return self._matches |
| 1598 | |
| 1599 | def __nonzero__(self): |
| 1600 | return self._matches |
| 1601 | |
| 1602 | def __getattr__(self, k): |
| 1603 | if k in self._keys: |
| 1604 | return None |
| 1605 | raise AttributeError |
| 1606 | |
| 1607 | def bind_split(s): |
| 1608 | if '@' in s: |