Using tuples correctly?

Ville Vainio ville at spammers.com
Mon Oct 11 08:58:06 EDT 2004


>>>>> "Bjorn" == BJörn Lindqvist <bjourne at gmail.com> writes:

    Bjorn> instantiate classes instead. OK. Fine. Or they use tuples
    Bjorn> because they are convenient and becomes annoyed because
    Bjorn> they have to use index access.

Did you check out the Bunch data type already?

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308

It doesn't support "tuple unpacking", but otherwise it might fit your
needs...

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list