In Python, there is no transfer character by reference.
Just change the passed point, your changes will be visible from the calling function.
>>> def change(obj):
... obj.x = 10
...
>>> class Point(object): x,y = 0,0
...
>>> p = Point()
>>> p.x
0
>>> change(p)
>>> p.x
10
...
So, I have to pass this as: GetPoint (p, obj)?
Yes, although Iriimulia has a good moment. Links may have changed the call to return a point, rather than using the out parameter.
source
share