From: Chris B. <Chr...@no...> - 2004-11-15 20:45:51
|
John Hunter wrote: > What do you mean that python functions always return a tuple? How > about functions that return an int, or a string, or whatever? > >>>>def func(): return 1 >>>>type(func()) > > <type 'int'> > > Do you mean that python functions that return tuples always return > tuples <wink> ? no, I was a bit wrong. Python functions always return one object, and when it appears that you are returning multiple objects, you are really returning a single tuple with multiple objects in it. Have I got it right this time? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |