On 2020-02-02 2:00 p.m., Johan Vergeer wrote:
This would look pretty nice when it would just be used in f-strings.

My proposal isn't just about f-strings though. It should also allow developers 
to get the name of a variable, class, method or function anywhere else.

where do you want to do it that returning a string isn't good enough?

fstrings return a string. they seem perfect for this.

or are you trying to say you don't like the extra symbols around it? tbh I don't either. ideally I'd go for f"{#foo.}bar" but oh well, convincing ppl of this is gonna be harder than "just let it have comments" .-.

(fwiw, f"{#}Foo" would also be usable, for top-level elements and stuff.)

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/H6ULMWVE6G57O2VKYPYKSYGZSW232VAY/
Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/TKRCLAGRTAW2PXEKPIJBCUITWVK5G3QK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to