On Tue, Jan 13, 2009 at 4:16 AM, Alan Gauld <alan.ga...@btinternet.com> wrote: > "Mr Gerard Kelly" <s4027...@student.uq.edu.au> wrote
>> Is there any way to list the input arguments without listing them inside >> the function's parentheses? > > No, because the function expects 3 arguments so you must pass it 3. > That is the contract (or interface) that exists betweeen the writer of the > function and you the consumer of it. Programming. particularly on > larger projects with multiple teams, is all about defining interfaces > and adhering to them! If you want thebenefit of the function you must > respect its contract. You can use *args to pass multiple arguments in a list. For example, In [1]: def show(a, b, c): ...: print a, b, c In [2]: values = [1, 2, 3] In [3]: show(*values) 1 2 3 Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor