Editable strings anyone?
Tim Peters
tim.one at comcast.net
Mon Feb 18 01:08:35 EST 2002
[Jason Orendorff, on the regexp engine code]
> ...
> About halfway down, you'll see a function getstring() which returns
> a pointer to the searchable data in an object. This is where the
> requirement of a *contiguous* buffer is enforced.
>
> if (... buffer->bf_getsegcount(string, NULL) != 1)
> ... then raise an exception.
More, if you scour the core for calls to bf_getsegcount(), you'll discover
that nothing in the core knows what to do if it doesn't return 1: "multi
segment buffers" are of no use in the std distribution. I was told they
were added because "somebody insisted" they were needed. In return for
being unused, at least they confuse people <wink>.
guido-is-much-keener-on-"you-ain't-gonna-need-it"-these-days-ly y'rs - tim
More information about the Python-list
mailing list