[Cython] On the topic of wrapper classes
Robert Bradshaw
robertwb at math.washington.edu
Fri Jul 24 13:53:34 CEST 2009
This feels a lot like C++ operator overloading...
I'm not a fan of _as_parameter_, but maybe an "as foo_t" kind of
attribute that it would use every time it needed to convert it to a
foo_t (not just as a parameter, but in assignment, etc.) Certainly
something like this could be useful, but I'm not sure if it's needed.
- Robert
On Jul 23, 2009, at 8:29 PM, David P. Novakovic wrote:
> http://docs.python.org/library/ctypes.html#calling-functions-with-
> your-own-custom-data-types
>
> I notice it only accepts basic types... and obviously the
> implementation would be a lot simpler than what I am talking about
> for cython... but that's the general gist of it.
>
> I guess for cython it would be nice to be able to have a mapping of
> type -> attribute (or type_name -> attribute_name) so that when the
> class is passed as a parameter the attribute of the right type is
> passed instead.
>
> David
>
> On Fri, Jul 24, 2009 at 1:23 PM, Lisandro Dalcin
> <dalcinl at gmail.com> wrote:
> On Thu, Jul 23, 2009 at 11:44 PM, David P.
> Novakovic<davidnovakovic at gmail.com> wrote:
> >
> > It's already a feature in the python stdlib through ctypes, so it
> obviously
> > doesn't break the guidelines that much.
> >
>
> Sorry for my ignorance about ctypes... But could you point me to some
> code/link or provide some more comments in order I can understand what
> you commented above?
>
>
>
> --
> 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
> Cython-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/cython-dev
>
> _______________________________________________
> Cython-dev mailing list
> Cython-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/cython-dev
More information about the Cython-dev
mailing list