> Does this work dynamically, or does it rely on
> C code being generated and the C compiler working
> out the details?
It relies on C... that somewhat hinders the usefulness of the process.
There's also the code generator option but we're again onto a
compilation stuff.
--
Lawrence
http://www.o
On 8/12/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Tim Peters wrote:
>
> > It's unclear to me how to write portable ctypes code in the presence
> > of a gazillion integer typedefs and #defines, such as for Py_ssize_t.
>
> A start would be to have constants in the ctypes module
> for Py_ssize_t and
> The "negative coerced to 0" behaviour is to make it easy to do things like
> padding a sequence to a minimum length:
>
>seq = seq + pad * (min_length- len(seq))
>
> Without the current behaviour, all such operations would need to be rewritten
> as:
>
>seq = seq + pad * max((min_length- l
I've never seen bugs determined by operations such as:
"foobar" * -1
and to be honest I've never seen code like that because the semantics
is somewhat senseless to me but I think the behavior of the expression
evaluation of "Sequence * negative integer" should be changed from:
>>> "foobar" * -1