Chris Angelico writes: > The policy of not returning self is, from my understanding, to clarify > which methods return a new thing and which mutate the existing one. It > makes this sort of distinction very obvious:
That seems likely. > If list.sort() returned self after mutation, the second one would > appear to work, but would leave the original list in a different > order. Which is what I would expect for a *sort* *method*. But I guess others might not think about it and be unpleasantly surprised. _______________________________________________ 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/3ALFYAO5WHLDZ5ESM6OAK4TMB7XFA7OJ/ Code of Conduct: http://python.org/psf/codeofconduct/