A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-July/067364.html below:

[Python-Dev] The buffer() function

[Python-Dev] The buffer() function [Python-Dev] The buffer() functionFredrik Lundh fredrik at pythonware.com
Thu Jul 13 19:20:53 CEST 2006
Thomas Heller wrote:

>>> Naturally I tried to call base64.encodestring(buffer(ctypes_instance))
>>> and it worked, so that was my answer.
 >>
>> does ctypes_instance implement the buffer API ?  if it does, is the 
>> buffer() call even necessary ?
> 
> Yes, in both cases.

are you sure?  does it implement the bf_getreadbuffer slot?  afaik, 
afaicr, and from what I can tell by looking briefly at the sources, the 
binascii.b2a_base64 function uses the the s# marker, and that argument 
type accepts strings *and* read only buffers, right away.  no extra crud 
should be necessary.

</F>

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