
June 14, 2008
11:48 p.m.
David Pokorny wrote:
In the spirit of going in the reverse direction of turning print into a function, what does python-ideas think of the sort statement?
I don't think that sorting is a frequent enough operation in general to justify having its own statement.
The main advantage is that it is impossible to make this mistake:
x = y.sort()
If you make that mistake, you find out about it very quickly, and you learn not to make it again. Also, there are many other methods that have the same characteristic. Would you want to turn all of them into statements as well? -- Greg