How do I get the filepath for a class in Python?

前端 未结 3 1823
执笔经年
执笔经年 2020-12-07 23:44

Given a class C in Python, how can I determine which file the class was defined in? I need something that can work from either the class C, or from an instance off C.

<
3条回答
提交回复
热议问题