Serhiy Storchaka added the comment:

Blacklisting by name is slow and it prevents a user from defining a codec with 
blacklisted name.

What if just add private attribute ("_not_text"?) to unsafe codecs? If a codec 
has this attribute, than it should not be used it text encoding/decoding. 
Checking an attribute is much faster than comparing with a couple of strings.

Another possibility is an inheriting all unsafe codecs from special class.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19619>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to