You are viewing an older version (9.14.0).Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.14.0 / IPython / utils / text / SList / sort

function

IPython.utils.text:SList.sort

source: /dev/ipython/IPython/utils/text.py:224

Signature

def sort(self, field: Optional[List[str]] = None, nums: bool = False) → Self

Summary

sort by specified fields (see fields())

Extended Summary

Example

a.sort(1, nums = True)

Sorts a by second field, in numerical order (so that 21 > 3)

Aliases

  • IPython.core.interactiveshell.SList.sort