
Aug. 20, 2002
2:14 p.m.
Casey> In general you wouldn't care whether is was a sre_foo or an sre_bar, just if Casey> it acts like a compiled regular expression, and therefore supports that Casey> interface. So, the real solution would be to have re assert that interface on Casey> whatever the compiler returns so that you can check for it, something like: Casey> if ISre.isImplementedBy(unknown_ob): Casey> # It's a regex Casey> Where ISre is the compiled regular expression interface object. If the Casey> implementation varies the test would still work. Even if the interface Casey> varied, the test would work (but it might break other stuff). Exactly.