ctypes 0.9.2 released

Peter Hansen peter at engcorp.com
Fri Oct 29 09:31:03 EDT 2004


Just wrote:
> In article <1gmeuqj.1p0mkh41y1zvfcN%aleaxit at yahoo.com>,
>  aleaxit at yahoo.com (Alex Martelli) wrote:
>>Seconded!  Python 2.5 should be mostly about standard-library
>>enhancements, and ctypes would be a huge enhancement to Python's stdlib.
> 
> In general, Guido is very reluctant to accept thing which make is easy 
> to cause segfaults. I predict you'll have a very hard time convincing 
> him...

That's too bad, because it's really not that easy to cause segfaults
with it.

I'm speaking practically, as someone who has used ctypes in a dozen
different utilities and applications, and who hasn't always read the
docs, and who has experimented sometimes in ways that in a language
like C would cause segfaults, but with ctypes: no segfaults to date.

I'm obviously not saying it's not possible to cause segfaults
with ctypes.  Almost anyone could probably come up with a way in a
few minutes or less.

I _am_ saying that casual use over the period of several years
has not led to any segfaults for _me_, and the benefits have
been huge.

Nobody is forcing someone to use ctypes, and I suppose if one
chooses to use it, one probably has some idea of the dangers of
what one is doing.

Of course, nobody is forcing anyone to include ctypes in the
standard distribution either, but it seems that the choice should
be made based more on what ctype's *users* think about it than
what someone who perhaps has rarely or never actually used it
thinks.  Or is Guido a regular ctypes user (and presumably one
who has often triggered unexpected segfaults, at that)?

-Peter



More information about the Python-list mailing list