at this time, SRE uses types instead of classes for compiled
patterns and matches. these classes provide a documented
interface, and a bunch of internal attributes, for example:
code -- a PCRE code object
pattern -- the source pattern
groupindex -- maps group names to group indices
regs -- same as match.span()?
groupindex -- as above
re -- the pattern object used for this match
string -- the target string used for this match
the problem is that some other modules use these attributes
directly. for example, xmllib.py uses the pattern attribute, and
other code I've seen uses regs to speed things up.
in SRE, I would like to get rid of all these (except possibly for
the match.string attribute).