4 ms·
Well in python I assume it would be equivalent of accessing: self.__dict__['property_name'] And if those PHP rules were in python you could just write: @
by crimsonnoodle58 2y ago
Well in python I assume it would be equivalent of accessing:
self.__dict__['property_name']
And if those PHP rules were in python you could just write:
@property
def property_name(self):
return self.property_name
In actual python though, that would infinitely recurse.
- arkh 2y agoOr if they could follow Godot syntax: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#properties-setters-and-getters https://docs.godotengine.org/en/stable/tutorials/scripting/g... var milliseconds: int = 0 var seconds: int: get: return milliseconds / 1000 set(value): milliseconds = value * 1000