Python: Find the version of the function I’m using

Python: Find the version of the function I’m using … here is a solution to the problem.

Python: Find the version of the function I’m using

I’m a bit confused about my import, I want to see which version of the function I’m using. Is there any way to get the filename where the implementation or class is located?

Solution

You can use > inspect modules from standard Python libraries

import inspect

inspect.getfile(some_func)

Related Problems and Solutions