A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-December/106363.html below:

[Python-Dev] "buffer interface" messages

[Python-Dev] "buffer interface" messages [Python-Dev] "buffer interface" messagesAntoine Pitrou solipsis at pitrou.net
Fri Dec 3 17:28:14 CET 2010
On Fri, 03 Dec 2010 10:11:29 -0500
"R. David Murray" <rdmurray at bitdance.com> wrote:
> > 
> > >>> 'abc'.transform('hex')
> > TypeError: 'str' does not support the buffer interface
> > >>> b'abc'.transform('rot13')
> > TypeError: expected an object with the buffer interface
> 
> I find these 'buffer interface' error messages to be the most confusing
> error message I get out of Python3 no matter what context they show up
> in.  I have no idea what they are telling me.  That issue is more
> general than transform/untransform, but perhaps it could be fixed
> for transform/untransform in particular.

I agree. "buffer interface" is a technicality that the Python user
doesn't do about (unless (s)he also writes C extensions). How about
"expected a bytes-compatible object"?

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4