[Python-Dev] I18N Toolkit

Fredrik Lundh fredrik@pythonware.com
Wed, 10 Nov 1999 11:52:28 +0100


(a copy was sent to comp.lang.python by mistake;
sorry for that).

Andrew M. Kuchling <akuchlin@mems-exchange.org> wrote:
> I don't think that will be a problem, given that the Unicode engine
> would be a separate C implementation.  A bit of 'if type(strg) ==
> UnicodeType' in re.py isn't going to cost very much speed.

a slightly hairer design issue is what combinations
of pattern and string the new 're' will handle.

the first two are obvious:
 
     ordinary pattern, ordinary string
     unicode pattern, unicode string
 
 but what about these?
 
     ordinary pattern, unicode string
     unicode pattern, ordinary string
 
 "coercing" patterns (i.e. recompiling, on demand)
 seem to be a somewhat risky business ;-)
 
 </F>