Changeset 1311


Ignore:
Timestamp:
May 22, 2013 3:29:45 PM (10 years ago)
Author:
jemian
Message:

rst_table now handles numerical values in list, by using str(item)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • APSpy/trunk/src/APSpy/rst_table.py

    r1281 r1311  
    255255        text = ""
    256256        if len(row) > 0:
    257             for line_num in range( max(map(len, [_.split("\n") for _ in row])) ):
    258                 item = [self._pick_line(r.split("\n"), line_num) for r in row]
     257            for line_num in range( max(map(len, [str(_).split("\n") for _ in row])) ):
     258                item = [self._pick_line(str(r).split("\n"), line_num) for r in row]
    259259                text += indentation + fmt % tuple(item)
    260260        return text
     
    269269            width = [max(map(len, _.split("\n"))) for _ in self.labels]
    270270        for row in self.rows:
    271             row_width = [max(map(len, _.split("\n"))) for _ in row]
     271            row_width = [max(map(len, str(_).split("\n"))) for _ in row]
    272272            if len(width) == 0:
    273273                width = row_width
Note: See TracChangeset for help on using the changeset viewer.