Craig Citro wrote:
> you could write a function
> that takes an arbitrary Python object, but decide that you "know" it
> will only ever get called with a dict, and directly dispatch to
> various PyDict_* macros

Pyrex will do this if you declare the object as being of
type 'dict' (and it will check the type on the boundary
between Python and extension code, so it's still type-safe).
Similarly for 'list' and a few other built-in types that
have dedicated C APIs.

-- 
Greg
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to