On 1/10/20 4:25 pm, David Mertz wrote:
In all the years I've used and taught namedtuples, I think I've never used the ._replace() method. The leading underscore is a hint that the method is "private"
Usually that would be true, but namedtuple is a special case. The docs make it clear that the underscore is there to prevent it from clashing with a potential field name, not to suggest privateness. -- Greg _______________________________________________ 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/PDFF5DDXXY7YNBQUQZ2WBP2TVLDKWG3F/ Code of Conduct: http://python.org/psf/codeofconduct/