On Fri, 11 Mar 2022 at 14:36, Jeremiah Vivian <[email protected]> wrote: > > See Python's "batteries included" philosophy. > > If users find themselves re-implementing the same utility function over > > again and over again across different projects, it's a good sign that such > > a function should be part of the standard library. > Also something I agree with. What this method does is done a lot of times and > it could be made a little more readable by making it into an actual method. >
On the other hand, it might be an indication that a tuple is the wrong tool for the job. As noted, a namedtuple DOES allow you to replace one component, and to do so by name rather than knowing its index, so possibly that would be a better choice here. ChrisA _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/AHBORWEWN26RS7KWUFUJLRLRCE53RFIB/ Code of Conduct: http://python.org/psf/codeofconduct/
