python-varname
python-varname copied to clipboard
Dark magics about variable names in python
Hello, I was using Python varname for some of my projects enum variables which made logging much easier. But I noticed when profiling my code with cProfile there were tens...
the `nameof` always return an union, it makes it hard to use in places where we just want a string ```python foo = "..." x1: str = nameof(foo) #Expression of...
Fixes #108
👋 Hey, we're planning to use `varname` in https://github.com/argoproj-labs/hera to extract python variable names to use in yaml output. I was trying it out but get this error when linting...
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 >>>...
If you see this warning and the errors caused by it, please ensure you are running your code in the environment where the source code is available at runtime. Typical...
While looking for a fix for issue #114 I got the problem that only the first argument is evaluated. In other words inside a function it is always the first...
The signature binding fails if the function contains `kwarg_sources`. ### Reproduce ```python from varname import nameof def fn(var, **kwargs): print(nameof(var, frame=2)) # ... x = 5 fn(x) # OK fn(x,...