Marc-Andre Lemburg <m...@egenix.com> added the comment:

STINNER Victor wrote:
> 
> New submission from STINNER Victor <victor.stin...@haypocalc.com>:
> 
> readbuffer_encode() and charbuffer_encode() are not really encoder nor 
> related to encodings: they are related to PyBuffer. readbuffer_encode() uses 
> "s#" format and charbuffer_encode() uses "t#" format to parse their 
> arguments. Both functions were introduced by the creation of the _codecs 
> module 10 years ago (r14660).
> 
> I think that these functions should be removed. memoryview() should be used 
> instead.
> 
> Note: charbuffer_encode() is the last function using on of the "t" format (t, 
> t#, t*) in Python3.

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.

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

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

----------
nosy: +lemburg
title: Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() -> 
Remove codecs.readbuffer_encode() and        codecs.charbuffer_encode()

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

Reply via email to