← Back to team overview

larry-discuss team mailing list archive

New features: totuples, fromtuples

 

I added two new methods: totuples and tolist. And two new functions:
fromtuples and fromlist.

totuples can be used, for example, to prepare a larry for insertion
into a database:

        >>> y = larry([[1, 2], [3, 4]], [['a', 'b'], ['c', 'd']])
        >>> y.totuples()
        [('a', 'c', 1), ('a', 'd', 2), ('b', 'c', 3), ('b', 'd', 4)]

And from tuples could be used to go in the other direction.



Follow ups