Logo Search packages:      
Sourcecode: aap version File versions

def aap-1.090::aapre::MatchObject::groups (   self,
  default = None 
)

groups([default=None]) -> tuple

Return a tuple containing all the subgroups of the match, from
1 up to however many groups are in the pattern. The default
argument is used for groups that did not participate in the
match.

Definition at line 587 of file aapre.py.

00587                                   :
        """groups([default=None]) -> tuple

        Return a tuple containing all the subgroups of the match, from
        1 up to however many groups are in the pattern. The default
        argument is used for groups that did not participate in the
        match.

        """
        result = []
        for g in range(1, self.re._num_regs):
            a, b = self.regs[g]
            if a == -1 or b == -1:
                result.append(default)
            else:
                result.append(self.string[a:b])
        return tuple(result)

    def group(self, *groups):


Generated by  Doxygen 1.6.0   Back to index