python gripes survey
Jordan Krushen
jordan at krushen.com
Mon Aug 25 14:32:35 EDT 2003
On Mon, 25 Aug 2003 18:14:30 GMT, Afanasiy <abelikov72 at hotmail.com> wrote:
> Sure you can return an associative array, but in my experience the
> preference is to return a tuple. I'll probably get flamed for saying so,
> but this is how I feel and it is unavoidable. Returning a struct in C is
> easier to deal with than returning a near-mystery tuple in Python.
On one hand, you could always return a dict in your own code. On the
other, I find dealing with returned tuples to be as easy as it gets:
def f(x, y, z):
return(z, y, x)
a, b, c = f()
print a, b, c # 3 2 1
J.
More information about the Python-list
mailing list