7 ms·
There is some convention in Python - for example `reverse` and `sort` are mutating, whereas `reversed` and `sorted` are not. However, I don’t know if there is
by pansa 7y ago
There is some convention in Python - for example `reverse` and `sort` are mutating, whereas `reversed` and `sorted` are not.
However, I don’t know if there is a good reason why the mutating versions are methods and the non-mutating ones are standalone functions.