Nick Coghlan added the comment:

For me, the killer argument *against* a method based API is memoryview (and, 
equivalently, array.array). It should be possible to use those as inputs for 
the bytes->bytes codecs, and once you endorse codecs.encode and codecs.decode 
for that use case, it's hard to justify adding more exclusive methods to the 
already broad bytes and bytearray APIs (particularly given the problems with 
conveying direction of conversion unambiguously).

By contrast, I think "the codecs functions are generic while the str, bytes and 
bytearray methods are specific to text encodings" is something we can explain 
fairly easily, thus allowing the aliases mentioned in this issue to be restored 
for use with the codecs module functions. To avoid reintroducing the quirky 
errors described in issue 10807, the encoding and decoding error messages 
should first be improved as discussed in issue 17828.

----------
dependencies: +More informative error handling when encoding and decoding

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

Reply via email to