The closest is this (Observe that your casts of wrapper are not essential in case you make self posonly), but it surely breaks typing for self.funct. If you don't want that attribute or are Okay with it staying likely incompatible (the sole method of getting that may be to parametrize with-args sort explicitly), That ought to operate good. P = Par