[Python-Dev] PEP 461 Final? (original) (raw)
Stefan Behnel stefan_ml at behnel.de
Sat Jan 18 08:26:09 CET 2014
- Previous message: [Python-Dev] PEP 461 Final?
- Next message: [Python-Dev] PEP 461 Final?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven D'Aprano, 18.01.2014 02:27:
On Fri, Jan 17, 2014 at 08:49:21AM -0800, Ethan Furman wrote:
%s is restricted in what it will accept::
- input type supports Pybuffer? use it to collect the necessary bytes Can you give some examples of what types support Pybuffer? Presumably bytes. Anything else?
Lots of things: bytes, bytearray, memoryview, array.array, NumPy arrays, just to name a few.
Basically anything that wants itself to be representable as a chunk of memory with metadata. It's a very common thing in the Big Data department (although many people wouldn't know that they're actually heavy users of this protocol because they just use NumPy and/or Cython and don't look under the hood).
Stefan
- Previous message: [Python-Dev] PEP 461 Final?
- Next message: [Python-Dev] PEP 461 Final?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]