On Jan 23, 12:45 pm, Arnaud Delobelle wrote:
> Hi all,
>
> It just occurred to me that there's a very simple but slightly
> different way to implement properties:
>
> class PropertyType(type):
> def __get__(self, obj, objtype):
> return self if obj is None else self.get(obj)
> def
Hi all,
It just occurred to me that there's a very simple but slightly
different way to implement properties:
class PropertyType(type):
def __get__(self, obj, objtype):
return self if obj is None else self.get(obj)
def __set__(self, obj, val):
self.set(obj, val)
def __