Author ncoghlan
Recipients barry, belopolsky, benjamin.peterson, cben, eric.araujo, ezio.melotti, flox, georg.brandl, gregory.p.smith, gvanrossum, jcea, lemburg, loewis, ncoghlan, pconnell, petri.lehtinen, r.david.murray, ssbarnea, vstinner
Date 2013-04-24.14:22:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366813358.15.0.11980856979.issue7475@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-04-24 14:22:38ncoghlansetrecipients: + 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:38ncoghlansetmessageid: <1366813358.15.0.11980856979.issue7475@psf.upfronthosting.co.za>
2013-04-24 14:22:38ncoghlanlinkissue7475 messages
2013-04-24 14:22:37ncoghlancreate