Jelle Zijlstra <jelle.zijlstra at gmail.com> added the comment: I think we could do it by looking at __qualname__. ---------- _______________________________________ Python tracker <report at bugs.python.org> <https://bugs.python.org/issue46571> _______________________________________