Robert Bradshaw, 10.08.2012 23:00:
> We have plenty of non-transitive coercions. E.g. char* <-> object <->
> float.
Python <-> C coercions are not quite the same league as low-level C type
comparisons or coercions, though.
> While it's technically more correct to use signed or unsigned
> char, char* is pretty ubiquitous in the C world.
Absolutely - be it due to correct usage, "don't care" or bad design.
Requiring explicit signedness can easily drive this into a const-like
nightmare with "but I need it" casts all over the place.
> There's also the
> question of the python bytes object and array.array("c") which would
> be good to support. And this would disallow any nested chars as parts
> of structs (e.g. from external libraries--you could fake a signness in
> your declaration but that seems ugly).
And faking declarations could easily lead to even less portable code.
> All in all, particularly in light of interfacing with external code, I
> think disallowing char is overly strict.
+1
Stefan
_______________________________________________
cython-devel mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cython-devel