Logo Search packages:      
Sourcecode: aap version File versions

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

groupdict([default=None]) -> dictionary

Return a dictionary containing all the named subgroups of the
match, keyed by the subgroup name. The default argument is
used for groups that did not participate in the match.

Definition at line 652 of file aapre.py.

00652                                      :
        """groupdict([default=None]) -> dictionary

        Return a dictionary containing all the named subgroups of the
        match, keyed by the subgroup name. The default argument is
        used for groups that did not participate in the match.

        """
        adict = {}
        for name, index in self.re.groupindex.items():
            a, b = self.regs[index]
            if a == -1 or b == -1:
                adict[name] = default
            else:
                adict[name] = self.string[a:b]
        return adict
        return adict


Generated by  Doxygen 1.6.0   Back to index