Confessions of a Python fanboy
Carsten Haese
carsten.haese at gmail.com
Thu Jul 30 13:42:30 EDT 2009
r wrote:
> Of course in python you would do...
> vector.reverse --> in-place
> vector.reversed --> in-place
You do know that only one of those works in-place, right?
> The above example works pretty good, but this doesn't always "sound"
> good. Take for example this...
> point3d.offset --> return a new pt
> point3d.offseted --> What did you say!?!?!
>
> Now try Ruby's way
> point3d.offset!
> point3d.offset
>
> a symbol works better for these things
Or you could use a better verb:
point3d.move -> modifies in place
point3d.moved -> returns a new point
-Carsten
More information about the Python-list
mailing list