Named tuples

Elbert Lev elbertlev at
Thu Nov 18 18:34:37 CET 2004

Carlos Ribeiro <carribeiro at> wrote in message news:<mailman.6539.1100779323.5135.python-list at>...
> On Thu, 18 Nov 2004 05:04:16 GMT, Bryan <belred1 at> wrote:

> There are a few requirements that can be imposed to avoid problems.
> First, __names__ is clearly a property, acessed via get & set (which
> allows to trap some errors). It should accept only tuples as an
> argument (not lists) to avoid potential problems with external
> references and mutability of the names. As for the validation, I'm not
> sure if it's a good idea to check for strings. maybe just check if the
> 'names' stored in the tuple are immutable (or perhaps 'hashable') is
> enough.

With on changes to the language the same can be achived by using db_row module

More information about the Python-list mailing list