lp://staging/~pythonregexp2.7/python/issue2636-03
Add subscript operators and len and iteration semantics to the match object. Initially, the idea was to allow the use of subscript operators ([]) to access, get ranges of and slice a match object where index represents the value passed to group to obtain ordinal match groups. This, as a consequence, would imply the use of the __len__ property and iteration over a match object so those changes will also be attempted here. In other words, m.group(n) could be written m.group[n], where n could be a ordinal value (0, 1, 2, ...) or a named match string (e.g. 'foo'). Because m.group(0) returns the entire match, m[0] would also do so. However, this may not be desirable in all cases, so in addition to m[1:] being made valid, a new method, captures(self) will be added that will return an iterator suitable for iteration over JUST the capture groups.
- Get this branch:
- bzr branch lp://staging/~pythonregexp2.7/python/issue2636-03
Branch merges
Branch information
Recent revisions
- 39029. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the core Regexp branch.
- 39028. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the core Regexp branch.
- 39027. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the core Regexp branch.
- 39026. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the core Regexp branch.
- 39025. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the core Regexp branch.
Branch metadata
- Branch format:
- Branch format 6
- Repository format:
- Bazaar pack repository format 1 with rich root (needs bzr 1.0)