On Thu, 17 Sep 2020 at 14:12, Chris Angelico <ros...@gmail.com> wrote:

> Assigning to an f-string is VERY tempting. It doesn't quite sit right
> with me (f-strings feel like literals, even though they aren't, and it
> doesn't make sense to assign to a string literal) - but I do like the
> concept. If it existed in the language, I would definitely use it.
> That's not to say it should exist, but I would use it if it did :)

That's a good point. If a feature like this existed, I would probably
use it too. But:

1. I don't like the idea of assigning to f-strings - like you say that
feels too much like assigning to a literal. A stdlib function would
feel *far* more natural to me.
2. Unlike formatting, error handling is much more important (and more
app-specific) for parsing. A "one size fits all" ValueError isn't
likely to be sufficient for anything but quick scripts, I suspect.

Paul
_______________________________________________
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/TQXZVESZ3IZF4MH3DBLXXN7TAJ2MKSBQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to