Jan. 11, 2001
10:04 a.m.
Too hard! It's enough to do
move = translate
And let's not forget, while we're at it, that a synonym for a word might by another symbol, like *, thanks to the "operator override" feature.
From my real "poly" class (polyhedron), written before I'd forgotten what Tim just showed me:
class Poly: <<SNIP>> __mul__ = scale __rmul__ = __mul__
import polys a = polys.Octa() b = a*3 b Octa: origin=(0.0, 0.0, 0.0); volume=108.0 c = a.scale(3) c Octa: origin=(0.0, 0.0, 0.0); volume=108.0
Kirby