[Python-ideas] Re: Extract variable name from itself

2023-09-22 Thread Stephen J. Turnbull
Dom Grigonis writes: > Simply eval/exec string inputs. I sometimes use of these for ad-hoc > callbacks. Would be great if `v` was recognised as a code. Looking at the example, do you mean '=' here? That is, you want to add semantics for prefixed '=', meaning "just insert the expression string

[Python-ideas] Re: Extract variable name from itself

2023-09-22 Thread Dom Grigonis
Just want to add to this as I encountered a case, where I think f-string would be sensible to use. Third potential use case after logging & dictionary key synchronisation with variables names. Simply eval/exec string inputs. I sometimes use of these for ad-hoc callbacks. Would be great if `v` w