decorators.py 234 B

12345
  1. class class_property(property):
  2. def __get__(self, instance, type):
  3. if instance is None:
  4. return super(class_property, self).__get__(type, type)
  5. return super(class_property, self).__get__(instance, type)