July 21, 2010
12:27 a.m.
岳帅杰 wrote:
Sorry, I don't know what is the "no constant arguments" guideline refers to. Could you give me some more explanation?
It's a rule of thumb that Guido says he uses when designing an API. If in the majority of use cases for a proposed function, one of its arguments would always be a constant that chooses between two or more different behaviours, then it would probably be better to have separate functions for each of the behaviours. -- Greg