[Cython] Fused types syntax

Chris Colbert sccolbert at gmail.com
Thu Jun 2 19:14:09 CEST 2011


Not that my opinion carriers any weight, but I'm +1 on this.


On Thu, Jun 2, 2011 at 11:39 AM, Robert Bradshaw <
robertwb at math.washington.edu> wrote:

> In looking at merging fused types, it's time to nail down the syntax.
> The current implementation is
>
>    ctypedef cython.fused_type(list, dict, object) fused_t
>
> This requires an addition to the grammer to allow the "call" syntax in
> a type declaration, as well as special casing to make it allowed only
> in a typedef. What about
>
>    cython.fused_type[list, dict, object].
>
> One advantage is that indexing is already valid in type declarations,
> and its the typical syntax for parameterized types. Thoughts? Any
> other ideas?
>
> - Robert
>
>
> P.S. Anyone remember buffers and C++ templated types are dissallowed
> as typedefs?
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20110602/0b696304/attachment.html>


More information about the cython-devel mailing list