I know I could do
self.value_at_location=(x,y,value)
by defining the method as value_at_location=(x,y,value)
but for readability, I think it would be AWESOME if value_at_location(x,y)=(value) was possible. or something like it.
Any suggestions?
No, you can’t define a setter method to do
foo(x,y) = value.But what you can do is define
[]=(x,y,value), so that you can callself[x,y] = value.