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/2008-May/079591.html below:

[Python-Dev] buffer interface for C extensions

[Python-Dev] buffer interface for C extensions [Python-Dev] buffer interface for C extensionsDan Lenski dlenski at gmail.com
Tue May 20 01:32:38 CEST 2008
On Sun, 18 May 2008 22:59:05 +0000, Dan Lenski wrote:
> So here's what I don't understand.  Why doesn't the "t#" argument
> specifier support read-write buffers as well as read-only buffers? 
> Aren't read-write buffers a *superset* of read-only buffers??  Is there
> something I'm doing wrong or a quick fix to get this to work
> appropriately?

So... I've answered my own question on this.  I had a look in getargs.c, 
and apparently the "t#" argument specifier only accepts *character-based* 
readable buffers.

Is there any chance anyone of adding an argument specifier for readable 
buffers in general?  Say, "r#"?

Can anyone explain to me the rationale for having some data type support 
the readable buffer interface, but /NOT/ the character-based buffer 
interface?  I can't find any information that explains the fundamental 
distinction between the two... and I don't see why array('B') shouldn't 
support both.

Dan

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