On 11/5/07, Bill Janssen <[EMAIL PROTECTED]> wrote: > > > > 3. the ABC corresponding to buffer-API objects: MemoryBlock > > > > > > What do you think about RawData, RawBlock, RawView or RawSequence? From > > > my point of view a PyBuffer allows me to access the raw data of a > > > PyString or PyBytes. > > > > "Raw" has lots of different connotations (e.g. raw_input() in 2.x). I > > like "Memory" best since it indicates directly that it's connected to > > the computer's (primary) memory. > > How about ByteBlock? I like the "Block" part.
Me too, but the alliteration of ByteBlock somehow rubs me the wrong way. > Two points: Every other type of data structure is connected to the the > "memory" in the same way, strings no less than buffers. And it (and all > the other data types) are not really connected to the computer's > primary memory these days; virtual at best. It's the bytes which are > the interesting piece of info here; they should be in the name. But the *Block type is different because its primary use is to share that memory / those bytes with code that lives at the C level. In favor of "memory" is also that Travis Oliphant independently came up with "memoryview" for the data type that makes the buffer API accessible from Python. BTW a separate issue is that there currently is no way for a class defined in Python to implement PyObject_GetBuffer, other than inheriting from an object that already implements it. There should be a possible wrapper so that you can wrap around e.g. a bytes object. This is really an issue for PEP 3118 though. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
