While we're discussing arithmetic operations anyway...:

I happen to routinely write (some complex integer expression)**2 in
Python, and it is tedious to manually store the expression in a temporary
etc. in Cython.

I understand the reasons this is disabled from the FAQ; are there any
reasons I can't create a Cython-specific utility code implementation of
integer power though? The powers are usually very small here so I'm
thinking just a for-loop with O(log n) multiplications...

Or if the power is a smallish literal (my **2 an **3), I suppose just
inline the multiplication operations...

Dag Sverre

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

Reply via email to