[Python-Dev] Re: Codecs lookup order

François Pinard pinard@iro.umontreal.ca
Tue, 10 Sep 2002 11:26:56 -0400


[Martin v. Loewis]

> pinard@iro.umontreal.ca (Fran.ois Pinard) writes:

>> I'm not sure what should best be done.  1) The documentation might be
>> modified to explain the limitation, so other users do not trip up on it.
>> 2) `encoding.lookup()' might merely return None in case `getregentry' is
>> not defined in the imported module, or else, 3) it could make sure that it
>> imports modules exclusively from within the `encodings' package.

> This is what Python 2.3, and Python 2.2.2 will do.

Hi, Martin.

I added "1)", "2)" and "3)" in the original text for clarity.  Will Python
2.2.2 and 2.3 do "3)", or all of "1)", "2)" and "3)"?

If the codec search order is not changed, how one proceeds if s/he wants to
override a bundled codec, with a provided other with the same encoding name?

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard