[Python-Dev] PEP 298, final (?) version

Mark Hammond mhammond@skippinet.com.au
Thu, 1 Aug 2002 23:22:55 +1000


> The only thing I consider worth changing is to rename the
> whole stuff from 'fixed buffer interface' to 'locked buffer
> interface', which makes more sense at the current state.

Agreed.

Sorry if I missed this before, but:
>     If the object never resizes or reallocates the buffer
>     during it's lifetime, this function may be NULL. Failure to call
>     this function (if it is != NULL) is a programming error and may
>     have unexpected results.

Not sure I like this.  I would prefer to put the burden of "you must provide
a (possibly empty) release function" on the few buffer interface
implementers than the many (ie, potentially any extension author) buffer
interface consumers.

I believe there is a good chance of extension authors testing against, and
therefore assuming, non-NULL implementations of this function.  OTOH, if
every fixed buffer consumer assumes a non-NULL implementation, people
implementing this interface will quickly see their error well before it gets
into the wild.

No biggie, but worth considering...

Mark.