Lasse Vågsæther Karlsen wrote: > Max M wrote: > So what you're saying is that instead of: > > def fn(*values, **options): > > I should use: > > def fn(values, cmp=cmp): > > in this specific case? > > and then instead of: > > fn(1, 2, 3, cmp=...) > > this: > > fn([1, 2, 3], cmp=...)
Precisely. Sometimes you need different interfaces for a method. In that case it is fine. But if you are just doing it instead of passing sequences, you are just (ab)using the * and ** operators. The method definition, like any python code, is made for humans not machines. The more obvious you can make the function definition, the happier anyone will be. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list