Martin v. Löwis <mar...@v.loewis.de> added the comment: > integers or 1-character strings? What about general mapping? Should > any of them have 0xFFFE or '\uFFFE' represent an undefined mapping?
The documentation says that the parameter "can be a dictionary mapping byte or a unicode string, which is treated as a lookup table". So anything that supports GetItem with a small integer index can be passed. It then says '... U+FFFE “characters” are treated as “undefined mapping”'. So the answer to your last question is "yes". I hope that the answer to your other questions follows from that (strictly speaking, it's only U+FFFE, not 0xFFFE, that is documented as indicating an undefined mapping; a patch should probably fix that). (I also wonder where the support for LookupError comes from - that appears to be undocumented) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14850> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com