Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
sre_parse.Pattern Class Reference

List of all members.

Public Member Functions

def __init__
def opengroup
def closegroup
def checkgroup

Public Attributes

 flags
 open
 groups
 groupdict

Detailed Description

Definition at line 66 of file sre_parse.py.


Constructor & Destructor Documentation

Definition at line 68 of file sre_parse.py.

00068 
00069     def __init__(self):
00070         self.flags = 0
00071         self.open = []
00072         self.groups = 1
        self.groupdict = {}

Here is the caller graph for this function:


Member Function Documentation

def sre_parse.Pattern.checkgroup (   self,
  gid 
)

Definition at line 86 of file sre_parse.py.

00086 
00087     def checkgroup(self, gid):
00088         return gid < self.groups and gid not in self.open

def sre_parse.Pattern.closegroup (   self,
  gid 
)

Definition at line 84 of file sre_parse.py.

00084 
00085     def closegroup(self, gid):
        self.open.remove(gid)
def sre_parse.Pattern.opengroup (   self,
  name = None 
)

Definition at line 73 of file sre_parse.py.

00073 
00074     def opengroup(self, name=None):
00075         gid = self.groups
00076         self.groups = gid + 1
00077         if name is not None:
00078             ogid = self.groupdict.get(name, None)
00079             if ogid is not None:
00080                 raise error("redefinition of group name %s as group %d; "
00081                             "was group %d" % (repr(name), gid,  ogid))
00082             self.groupdict[name] = gid
00083         self.open.append(gid)
        return gid

Member Data Documentation

Definition at line 69 of file sre_parse.py.

Definition at line 72 of file sre_parse.py.

Definition at line 71 of file sre_parse.py.

Definition at line 70 of file sre_parse.py.


The documentation for this class was generated from the following file: