Re: Tuples vs. variable-length argument lists

2010-03-22 Thread Jean-Michel Pichavant
Spencer Pearson wrote: Hi! This might be more of a personal-preference question than anything, but here goes: when is it appropriate for a function to take a list or tuple as input, and when should it allow a varying number of arguments? It seems as though the two are always interchangeable. For

Re: Tuples vs. variable-length argument lists

2010-03-19 Thread Steven D'Aprano
On Fri, 19 Mar 2010 17:20:31 -0700, Spencer Pearson wrote: > Hi! > > This might be more of a personal-preference question than anything, but > here goes: when is it appropriate for a function to take a list or tuple > as input, and when should it allow a varying number of arguments? That depend

Tuples vs. variable-length argument lists

2010-03-19 Thread Spencer Pearson
Hi! This might be more of a personal-preference question than anything, but here goes: when is it appropriate for a function to take a list or tuple as input, and when should it allow a varying number of arguments? It seems as though the two are always interchangeable. For a simple example... def