On Apr 25, 2009, at 2:59 AM, Dag Sverre Seljebotn wrote:

> Robert Bradshaw wrote:
>>
>> Perhaps I'm taking a too simplistic view of things, but it seems that
>> all we have to do is figure out whether or not we can pass a given
>> operator onto the C++ code, which is much easier to reason about.
>> Also, because in Python assignment is not an expression, we don't
>> have to worry about its return value.
>
> Hmm. That's a nice perspective to have; but I don't think it is
> "obvious" and leads to some fairly concrete consequences IMO:  
> Operators
> must be declared using the Python operator syntax.

I'm not so sure about this, I think using declaring the C++ operatorX  
notation may be more transparent to what is actually going on,  
despite a (minor) complication in the parser.

> So you are never
> declaring anything about "operator[]" in Cython, instead you are
> declaring "what types are allowed for the full statement 'x[i] = y'".

Yes, I think that's as far as we need to go.

- Robert

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

Reply via email to