Message 27716 - Python tracker (original) (raw)
A very minor inconsistency -- when I call unicode() with an encoding that Python doesn't know about, it usually returns a lookup error (e.g LookupError: unknown encoding: utf99). But when the encoding begins with a dot (ASCII 0x2e), Python instead gives a ValueError: Empty module name. It is certainly correct in raising an error, but it should raise a lookup error, not a value error.
I've recreated this under Python 2.4.1/FreeBSD 6.0 and 2.3/OS X. See attachment for recreation steps.