stylistic question -- optional return value
Andrew Koenig
ark at research.att.com
Wed Aug 28 16:58:39 EDT 2002
Paddy> I would suggest something like (True, x, y) and (False, x, y)
Paddy> where False means disregard any y value. You could then
Paddy> consistently assign the return value of your function to three
Paddy> variables and examine the first to see if y contains useful
Paddy> data.
Hmmm... I think I like the (x, y) or (x, sentinel) idea better,
assuming that (x, y) or (x, None) isn't acceptable.
--
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
More information about the Python-list
mailing list