5
"""Put the result of a method which uses this (non-data)
6
descriptor decorator in the instance dict after the first call,
7
effectively replacing the decorator with an instance variable.
10
def __init__(self, wrapped):
11
self.wrapped = wrapped
12
self.__doc__ = wrapped.__doc__
14
def __get__(self, inst, objtype=None):
17
val = self.wrapped(inst)
18
setattr(inst, self.wrapped.__name__, val)