def from_iterable(table, value_func=lambda cell: cell,
                      properties_func=lambda cell: {},
                      name=None):
        """Make a table from a pythonic table structure.
           The table must be an iterable which returns rows (in top-to-bottom
           order), which in turn are iterables which returns cells (in
           left-to-right order).
           value_func and properties_func specify how the cell maps onto an
           _XYCell's value and properties. The defaults assume that you have a
           straight-forward list of lists of values."""
        new_table = Table(name=name)
        for y, row in enumerate(table):
            for x, cell in enumerate(row):
                new_table.add(
                    _XYCell(
                        value_func(cell),
                        x,
                        y,
                        new_table,
                        properties_func(cell)))
        return new_table