arg-passing style question

Guy Middleton guy at obstruction-no-spam.com
Sat Apr 19 16:12:16 EDT 2003


I want to pass two values to a function that expects a single argument.

So, I could wrap them in either a list or a tuple.  Is either way preferred
over the other?


queue = Queue.Queue()
a = "foo"
b = {"key": "value"}
queue.put((a,b))	# this works
queue.put([a,b])	# this works too




More information about the Python-list mailing list