I am not sure how to avoid it, but each access to self.active invokes a Py_None check, which is not necessary. @stefanv Any ideas?