
Oct. 14, 2011
7:15 a.m.
Nick Coghlan wrote:
The heart of the problem is that the name 'key_func' is repeated twice, encouraging short, cryptic throwaway names.
Seems to me you're encouraging that even more by requiring a name that doesn't even get used -- leading to suggestions such as using '_' as the name.
Maybe I'm worrying too much about that, though
Yes, I think you are. If an exception occurs in the callback function, the traceback is still going to show you the source line where it occurred, so there won't be any trouble tracking it down. Also there are already plenty of situations where the name of the function by itself doesn't tell you very much. It's common to have many methods with the same name defined in different classes. -- Greg