The closest is this (Be aware that the casts of wrapper usually are not needed in the event you make self posonly), however it breaks typing for self.funct. If you don't require that attribute or are Alright with it https://allytech.net.in/courses/python-training-in-bangalore/