Function modes vs. separate functions (was: PyWart: os.path needs immediate attention!)

2011-07-29 Thread Andrew Berg
On 2011.07.29 07:50 PM, Steven D'Aprano wrote: Especially if the implementation looks like this: def get_thing(argument, flag): if flag: return one_thing(argument) else: return another_thing(argument) Well, that would be annoying, but wouldn't it be even more

Re: Function modes vs. separate functions (was: PyWart: os.path needs immediate attention!)

2011-07-29 Thread Rustom Mody
Ben Finney said: But this is all getting rather generic and abstract. What specific real-world examples do you have in mind? regex match vs regex search? -- http://mail.python.org/mailman/listinfo/python-list