how to build a street with more than 1 house ?
Tommy Grav
tgrav at mac.com
Fri Jun 6 18:48:06 EDT 2008
On Jun 6, 2008, at 6:45 PM, Stef Mientki wrote:
> hello,
>
> In the code below, I can build a large street like this:
> large_street = house * 25
> but not a small street. like this:
> small_street = 5 * house
This calls the int.__mul__() code i believe.
> Why is this different ?
> And more interesting, how do I get the right results ?
If memory serves me right look into __rmul__().
Cheers
Tommy
More information about the Python-list
mailing list