So you are proposing to go against the Zen of Python's (Explicit is better than implicit) just to save a few key strokes? However, I have to grant you that this use case is so common (at least for all us using Cython for wrapping) that this idea could deserve some consideration? Two more lines to take into account:
Special cases aren't special enough to break the rules. Although practicality beats purity. On Thu, Jul 23, 2009 at 7:17 PM, David P. Novakovic<[email protected]> wrote: > Does cython have anything like the as_parameter functionality of ctypes? > > I mean, if i have a class Foo, which wraps a struct foo_t * foo, would be > it possible to say when i pass this object to a function the requires a > foo_t * parameter to pass the c level attribute of the correct type instead > of the actual python class? > > I'm writing a bunch of wrappers at the moment and it seems like there is a > lot of code that could be automated! > > Thanks... otherwise I'm really enjoying cython :) > > David > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > > -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
