[Python-Dev] pychecker warnings in Lib/encodings

Neal Norwitz nnorwitz at gmail.com
Thu Jun 15 07:51:27 CEST 2006


On 6/13/06, Walter Dörwald <walter at livinglogic.de> wrote:
>> > IIUC (and I probably don't), mbcs is on windows only. But should I be
> > able to import encodings.mbcs on Linux or is this expected?
> >
> >>>> import encodings.mbcs
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > File "Lib/encodings/mbcs.py", line 14, in <module>
> > class Codec(codecs.Codec):
> > File "Lib/encodings/mbcs.py", line 18, in Codec
> > encode = codecs.mbcs_encode
> > AttributeError: 'module' object has no attribute 'mbcs_encode'
>> mbcs_encode() is compiled conditionally in Modules/_codecsmodule.c with
> "#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)".
>> Should encodings/mbcs.py be made unimportable on non-Windows?

That's what I was thinking. It makes sense to this non-unicode,
non-windows luser. :-)
n


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /