Is there a way to make read-only class properties in Python? Ex. in Unity3d you can do this:
transform.position = Vector3.zero
Vector3.zero returns an instance of the Vector3 class where x, y, and z are 0. This is basically the same as:
transform.position = Vector3(0, 0, 0)
I've tried doing something like this:
class Vector3(object):
zero = Vector3(0, 0, 0)
...
But I get an undefined variable error because the class hasn't been defined yet. So how do you make read-only class properties that don't require an instance of the class?