Author vstinner
Recipients lemburg, vstinner
Date 2010-05-28.11:14:55
SpamBayes Score 0.0194883
Marked as misclassified No
Message-id <1275045298.05.0.722649960636.issue8838@psf.upfronthosting.co.za>
In-reply-to
Content
> Those two encoder functions were meant to be used by Python codec
> implementations which want to use the readbuffer and charbuffer
> interfaces available in Python via "s#" and "t#" to access input
> object data.

Ah ok.

> They are not used by the builtin codecs, 
> but may well be in use by 3rd party codecs.

My quick Google search didn't found any of those. I suppose that str and bytes are enough for most people. Do you know an usecase of text or bytes stored in different types than str and bytes? (I suppose the bytearray is compatible with bytes, and so it can be used instead of bytes)

> I'm not sure why you think those functions are not encoders.

I consider that Python3 codecs module only encode and decode text to/from an encoding, whereas Python2 had extra unrelated codecs like "base64" or "hex" (but it was decided to remove them to cleanup the codecs module).
History
Date User Action Args
2010-05-28 11:14:58vstinnersetrecipients: + vstinner, lemburg
2010-05-28 11:14:58vstinnersetmessageid: <1275045298.05.0.722649960636.issue8838@psf.upfronthosting.co.za>
2010-05-28 11:14:56vstinnerlinkissue8838 messages
2010-05-28 11:14:55vstinnercreate