A small suggestion for Python

Franz GEIGER fgeiger at datec.at
Sat Jan 13 03:49:39 EST 2001


Another idea: It could return what we all excpect to be returned: The object
that was sorted! So if a list is sorted, why not return the sorted list?

sortedMyItemList = unsortedMyItemList.sort()

Regards
Franz GEIGER

"Edward C. Jones" <edcjones at erols.com> wrote in message
news:3A5F27F7.30268D9A at erols.com...
> I have been programming in Python for several years. I still
> occasionally make mistakes with functions (such as sort) that
> return only "None". I suggest that functions like sort should
> return either "Nothing" or nothing. "Nothing" would be exactly
> like "None" except it can't be assigned. Whether "Nothing" or
> nothing is used, the statement "x= y.sort()" would raise a
> run-time Exception.
>
> Thanks,
> Ed Jones
>
>





More information about the Python-list mailing list