python-varname
python-varname copied to clipboard
argname sample code raises VarnameRetrievingError
I am running python 3.11 with Pythonnet opened IDLE Following the sample code in readme, I entered:
from varname import argname def func(a, b=1): print(argname('a')) x=2
func(x) Traceback (most recent call last): File "<pyshell#4>", line 1, in
func(x) File "<pyshell#2>", line 2, in func print(argname('a')) File "C:\Users\502751870\AppData\Local\Programs\Python\Python311\Lib\site-packages\varname\core.py", line 451, in argname raise VarnameRetrievingError( varname.utils.VarnameRetrievingError: Cannot retrieve the node where the function is called.
See
- #107