'sort by specified fields (see fields())
Example::
a.sort(1, nums = True)
Sorts a by second field, in numerical order (so that 21 > 3)'

def sort(self, field=None, nums=False):

    if (field is not None):
        dsu = [[SList([line]).fields(field), line] for line in self]
    else:
        dsu = [[line, line] for line in self]
    if nums:
        for i in range(len(dsu)):
            numstr = ''.join([ch for ch in dsu[i][0] if ch.isdigit()])
            try:
                n = int(numstr)
            except ValueError:
                n = 0
            dsu[i][0] = n
    dsu.sort()
    return SList([t[1] for t in dsu])
