Understanding some class attributes?
Posted: Fri Sep 27, 2013 11:13 pm
In entites.py (packages/source-python/entities/) there is this code in its __setattr__ method:
How come it doesn't use "object.__setattr__(self, attr, value)" ? Its causing me issues when trying to subclass PlayerEntity and when setting the index in my class.
'int' has no attribute 'fset' (or something similar)
Code: Select all
if self.__class__ != BaseEntity:
# Get the attribute and set its value
getattr(self.__class__, attr).fset(self, value)
# No need to go further
return
How come it doesn't use "object.__setattr__(self, attr, value)" ? Its causing me issues when trying to subclass PlayerEntity and when setting the index in my class.
'int' has no attribute 'fset' (or something similar)