On 07/18/2010 05:52 PM, Reid Kleckner wrote:
> Usual disclaimer: python-dev is for the development *of* python, not
> *with*. See python-list, etc.
Moving to python-list. Please keep discussion there.
>
> That said, def declares new functions or methods, so you can't put
> arbitrary expressions
Usual disclaimer: python-dev is for the development *of* python, not
*with*. See python-list, etc.
That said, def declares new functions or methods, so you can't put
arbitrary expressions in there like type(f).__mul__ .
You can usually assign to things like that though, but in this case
you run
Dear python-dev,
In mathematical notation, f*g = z->f(g(z)) and f^n = f*f*f... (n
times). I often run into situations in python where such operators
could result in cleaner code. Eventually, I decided to implement it
myself and see how it worked in practice.
However, my intuitive implementation [