Eric V. Smith <e...@trueblade.com> added the comment:
To be pedantic, f-strings don't "cast" to a string, they call format(obj) on the argument. Typically this is the same as str(obj), but it need not be. I guess if all of the arguments are already exact strings then this distinction doesn't matter, but I'd have to give it some more thought. I've never seen the pattern of joining a fixed size list, but I guess it exists in the wild. I'm skeptical that this optimization is worth doing. We should check on a real-world benchmark instead of a micro benchmark. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44194> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com