Le Mon, 03 Dec 2012 14:29:35 -0800, Larry Hastings <larry@hastings.org> a écrit :/*[clinic] dbm.open -> mapping basename=dbmopen const char *filename; The filename to open.So how does it handle the fact that filename can either be a unicode string or a fsencoding-encoded bytestring? And how does it do the right encoding/decoding dance, possibly platform-specific? [...]I see, it doesn't :-)
I like the idea, but it needs more polishing. I don't think the various "duck types" accepted by Python can be expressed fully in plain C types (e.g. you must distinguish between taking all kinds of numbers or only an __index__-providing number).