New submission from assume_away:
The simplest example:
def mydec(cls):
return type(cls.__name__, cls.__bases__, dict(cls.__dict__))
@mydec
class MyList(list):
def extend(self, item):
super(MyList, self).extend(item)
def insert(self, index, object
New submission from assume_away:
class Property:
def __init__(self, getter):
self.getter = getter
def __get__(self, instance, cls):
return self.getter(cls if instance is None else instance)
class MyClass:
@Property
def something(cls):
return
New submission from assume_away:
Many wrappers use the famous (*args, **kwargs) argspec, which is less than
helpful for a function that uses some positional arguments and maybe a few
keyword only arguments, ie (x, y, z=10). Other IDEs have the capability of
showing the wrapped functions