Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Sort a list on your own criteria with Python.
His call to sort reads like this:
alist.sort(mysort)
The ordering function doesn't sort, it orders. I would have called the ordering function myorder, so the call would read:
alist.sort(myorder)
More specifically, his ordering function orders by length, so even better would be:
alist.sort(orderByLength)
There are no comments on this comment yet.
His call to sort reads like this:
alist.sort(mysort)
The ordering function doesn't sort, it orders. I would have called the ordering function myorder, so the call would read:
alist.sort(myorder)
More specifically, his ordering function orders by length, so even better would be:
alist.sort(orderByLength)