[Python-ideas] Sort statement

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Jun 15 01:48:50 CEST 2008

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?


More information about the Python-ideas mailing list