You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the property descriptor cannot be called on the owner class, with error: AttributeError: 'NoneType' object has no attribute '__node__'. Calling the property on the class can be very useful for introspection. Also it is easily fixed bij changing:
class Property(object):
def __get__(self, instance, owner):
value = instance.__node__[self.key]
if value is None:
value = self.default
return value
in:
class Property(object):
def __get__(self, instance, owner):
if instance is None:
return self
value = instance.__node__[self.key]
if value is None:
value = self.default
return value
This is very common in descriptors.
The text was updated successfully, but these errors were encountered:
Currently the property descriptor cannot be called on the owner class, with error:
AttributeError: 'NoneType' object has no attribute '__node__'
. Calling the property on the class can be very useful for introspection. Also it is easily fixed bij changing:in:
This is very common in descriptors.
The text was updated successfully, but these errors were encountered: