python gripes survey

Dave Brueck dave at pythonapocrypha.com
Mon Aug 25 08:44:03 EDT 2003


On Monday 25 August 2003 12:14 pm, Afanasiy wrote:

> I have a bunch, many of them hard to define, but one that I just thought
> of I find strange sometimes is the use of tuples as near-mystery return
> values. I can't help but thinking a C struct with named fields is easier
> to remember than a tuple with fields accessed by integer.
>
> 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.

A bit of an apples-to-oranges comparison, isn't it? If you prefer to return a 
named structure in C, the Python equivalent certainly wouldn't be a tuple.

-Dave





More information about the Python-list mailing list