Message187707
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. |
|
Date |
User |
Action |
Args |
2013-04-24 14:22:38 | ncoghlan | set | recipients:
+ ncoghlan, lemburg, gvanrossum, loewis, barry, georg.brandl, gregory.p.smith, jcea, cben, belopolsky, vstinner, benjamin.peterson, ezio.melotti, eric.araujo, r.david.murray, ssbarnea, flox, petri.lehtinen, pconnell |
2013-04-24 14:22:38 | ncoghlan | set | messageid: <1366813358.15.0.11980856979.issue7475@psf.upfronthosting.co.za> |
2013-04-24 14:22:38 | ncoghlan | link | issue7475 messages |
2013-04-24 14:22:37 | ncoghlan | create | |
|