[Cython] [Fwd: Re: Surprise: A bool isn't a bool]
Robert Bradshaw
robertwb at math.washington.edu
Tue Jun 30 04:17:50 CEST 2009
On Jun 29, 2009, at 9:29 AM, Dag Sverre Seljebotn wrote:
> -------- Original Message --------
> Subject: Re: Surprise: A bool isn't a bool
> Date: Mon, 29 Jun 2009 18:26:58 +0200
> From: Bjarke Roune <bjarke at daimi.au.dk>
> To: Dag Sverre Seljebotn <dagss at student.matnat.uio.no>
> References: <mailman.42053.1246289710.27370.cython-dev at codespeak.net>
> <4f74ca650906290836t4c2a6f27i45b5b436abe4951c at mail.gmail.com>
> <4A48E772.8030603 at student.matnat.uio.no>
>
>> Indeed. The question is whether it is possible to find such a way.
>> Perhaps
>> disallow "bool" in cdef extern functions? Although that would add an
>> unecesarry typecheck if a C library in fact did return a Python
>> boolean
>> object... (like many C functions in Python's standard library might).
>>
> Perhaps let there be a switch to turn the error or warning off, and
> some kind of instruction in a Cython file that turns it off for only
> that file.
Actually, I'm not really sure why we have that as a builtin type at
all--it doesn't really do any good and leads to confusion (especially
if we introduce a real bool type later).
- Robert
More information about the Cython-dev
mailing list