def __get__(self, instance, owner): self.bind_class(owner) if instance is None: return self else: return six.create_bound_method(self.function, instance)