
Oct. 13, 2011
4:45 a.m.
I really like the proposal, although I would be interested to see if anyone can bikeshed up keywords that might be better than : or @… :-) I do have some questions about it. Does using @ instead of the name defined below make the implementation easier? In other words, would this cause a NameError on normalize because normalize isn't defined in the local namespace?-- :sorted_list = sorted(original, key=normalize) def normalize(item): … Or is the @ just for brevity? I assume the point is that it's not just brevity, but you have to use the @ in order to make the implementation straightforward. -- Carl Johnson