I think using parentheses for type parameterization is the most  
natural thing to do as well. (The only other viable syntax that comes  
to mind is angle brackets, and that's only natural to C++ people).  
This makes it valid Python syntax as well.

I think this is orthogonal to PEP 3107, which specifies where the  
type specification should go (and I agree we should support this  
syntax too). The proposal is that anywhere the compiler expects a  
valid type, a parameterized type would work as well.

The more I think about it, the more the plugin approach seems to be  
the right one to take, though I hope a lot can be specified in a .pxd  
without having to write custom plugins. These could be distributed  
with Cython, though not as part of the core compiler (see http:// 
wiki.cython.org/declaration )

- Robert


On Mar 8, 2008, at 9:37 AM, Stefan Behnel wrote:

> Dag Sverre Seljebotn wrote:
>> http://wiki.cython.org/enhancements/typeparameters
>
> Why do you think a new syntax for type parametrisation would be  
> better than
> reusing (parts of) PEP 3107?
>
> http://www.python.org/dev/peps/pep-3107/
>
> Stefan
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev

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

Reply via email to