[Python-checkins] r46186 - in python/branches/blais-bytebuf: Lib/test/test_hotbuf.py Modules/hotbufmodule.c

Jim Jewett jimjjewett at gmail.com
Thu May 25 00:44:14 CEST 2006


> Author: martin.blais
> Date: Wed May 24 18:01:38 2006
> New Revision: 46186

> Modified:
>   python/branches/blais-bytebuf/Lib/test/test_hotbuf.py
>   python/branches/blais-bytebuf/Modules/hotbufmodule.c
> Log:
> Implemented compact() and a few other things.

(1)  Why should clients have to call compact explicitly?

I would much prefer that it act like a circular buffer, and handle
wraparound itself, instead of expecting me to call compact.  (For
buffers with a size that is a power of two, this can even be done
fairly efficiently...)  Otherwise the typical idiom will be to stick a
compact() call after every buffer read or write, which will sort of
blow the efficiency gains.

(2)
The Char methods seem to assume two bytes for a character.  Should
that be build-dependent, for UCS4?

-jJ


More information about the Python-checkins mailing list