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/2005-October/057593.html below:

[Python-Dev] Inconsistent Use of Buffer Interface in stringobject.c

[Python-Dev] Inconsistent Use of Buffer Interface in stringobject.c [Python-Dev] Inconsistent Use of Buffer Interface in stringobject.cGuido van Rossum guido at python.org
Mon Oct 24 20:39:21 CEST 2005
On 10/24/05, M.-A. Lemburg <mal at egenix.com> wrote:
> Guido van Rossum wrote:
> > A concern I'd have with fixing this is that Unicode objects also
> > support the buffer API. In any situation where either str or unicode
> > is accepted I'd be reluctant to guess whether a buffer object was
> > meant to be str-like or Unicode-like. I think this covers all the
> > cases you mention here.
>
> This situation is a little better than that: the buffer
> interface has a slot called getcharbuffer which is what
> the string methods use in case they find that a string
> argument is not of type str or unicode.

I stand corrected!

> As first step, I'd suggest to implement the gatcharbuffer
> slot. That will already go a long way.

Phil, if anything still doesn't work after doing what Marc-Andre says,
those would be good candidates for fixes!

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
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