Albert-Jan Roskam wrote:
>
> Thank you. If list.__mul__ is so tricky, why did they implement it the way
> they did? Are there situations where this behavior could be useful?
>
> Btw, this is one of the rare (very, very rare) cases where I find CRAN R
> better than Python:
Using "multiply"
On 03/08/13 15:50, Albert-Jan Roskam wrote:
Suppose I initialize a list (letś say it's a record) to e.g all zeroes,
> or all sixes. Suppose, further, that I use "*" for this
(which is a nice an clean way).
Its only nice if you use it at the top level with an immutable value,
otherwise , as
Awesome, Rich, thanks!
- Warren
(war...@wantonhubris.com)
On Oct 4, 2009, at 5:31 PM, Rich Lovely wrote:
2009/10/4 Warren :
I'm a little confused on this one.
I have a Vector class that I want to be able to multiply by either
another
vector or by a single float value. How would I im
2009/10/4 Warren :
>
> I'm a little confused on this one.
>
> I have a Vector class that I want to be able to multiply by either another
> vector or by a single float value. How would I implement this in my
> override of __mul__ within that class?
>
> Do you check the variable type with a stack of
I'm a little confused on this one.
I have a Vector class that I want to be able to multiply by either
another vector or by a single float value. How would I implement this
in my override of __mul__ within that class?
Do you check the variable type with a stack of "if isinstance"
stateme