Fred .Flintstone added the comment:
A programmer want to instruct the computer to do something, without having to
care about how it works.
Maybe the library could in the background convert the list to a tuple.
Like:
"foo".startswith(tuple(["food", "for", "fast"]))
But the programmer shouldn't have to worry about this. I have a list, I want to
use the list. I shouldn't have to care about interpreter internals that have
nothing to do with the intent of my code.
My code should clearly represent intent, not have boilerplate code or
constructs to workaround interpreter internals.
--
___
Python tracker
<https://bugs.python.org/issue35897>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com