# -*- coding: utf-8 -*-
class fail(property): pass
class failstr(str): pass
class SomeClass(object):
failstr = failstr('gg')
failstr.description = 'lol'
def get_value(self):
return 1
def set_value(self, val):
pass
@property
def something2(self):
return self.failstr
something = fail(get_value, set_value)
#А здесь не работает
something.description = 'This is something property description'
sc = SomeClass()
##print sc.some_func
##print sc.some_func.description
print sc.something
#Соответственно здесь тоже ошибка
print sc.__class__.something.description
print sc.something2
print sc.something2.description