It is a standard convention in Python that mutating methods return None.
While that does make chaining operations harder (impossible), it is a consistent convention that makes it much harder to get confused about whether a method mutates or not.
It is not going to change.
See previous threads about a “fluent” interface for discussion about the concept.
-CHB
--
Christopher Barker, PhD
Python Language Consulting
- Teaching
- Scientific Software Development
- Desktop GUI and Web Development
- wxPython, numpy, scipy, Cython