On 12 dic, 08:46, "WaterWalk" <[EMAIL PROTECTED]> wrote:
> Hello, I was recently learning python decorator and descriptor and
> emulated a @classmethod decorator:
> class EmuClassMethod(object):
> def __init__(self, f=None):
> self.f = f
> def __get__(self, obj, klass=None):
>
WaterWalk wrote:
> Hello, I was recently learning python decorator and descriptor and
> emulated a @classmethod decorator:
> class EmuClassMethod(object):
> def __init__(self, f=None):
> self.f = f
> def __get__(self, obj, klass=None):
> if klass is None:
>klass
Hello, I was recently learning python decorator and descriptor and
emulated a @classmethod decorator:
class EmuClassMethod(object):
def __init__(self, f=None):
self.f = f
def __get__(self, obj, klass=None):
if klass is None:
klass = type(obj)
def wrapped(