On 2/26/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > One more question? What is the reason for separate read/write getbuffer > calls. What is the problem with just one getbuffer call with a flag to > indicate whether or not you want a writeable memory area?
I'm not sure; that API grew somewhat organically. I guess having separate functions makes it possible to test whether the buffer is writable at all, but IMO checking for an error is just as expedient, so as long as we're redesigning the whole API you can design whatever you want. > I prefer fewer function pointers because it means that extension types > must implement fewer functions. But, either way. Right. > I know there is some stylistic distaste for "flags" in APIs. That's more a Python-level preference. > One could still keep two C-API calls for getting read-only and writeable > buffers. -- --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
