Hi, Robert Bradshaw wrote: > On Mar 8, 2008, at 12:57 PM, Stefan Behnel wrote: >> Robert Bradshaw wrote: >>> 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. >> >> How is that? > > foo(arg) is a valid cython expression, foo<arg> is not. The PEP > specifies any valid expression can follow the :
Regarding function parameters, yes, so that's definitely an advantage. But that does not yet give you type annotations for variables. If I understand the original proposal right, those would become cdef type.param(1,2,3) varname I don't see how you could embed this kind of declaration in pure Python. Also, a "ctypedef" might often be better than a parametrisation per use (but I guess that's up to the programmers). > Numpy is a bit of > a special case, as they are actually going to use Cython and probably > help write their own .pxd files. But for most libraries I think > distributing them with Cython makes perfect sense (For example, I bet > gmp is not about to shop Cython bindings to their library, for instance). Agreed. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
