tiled.client.container.Container.sort
- Container.sort(*sorting)[source]
Make a Node with the same entries but sorted according to sorting.
Examples
Sort by “color” in ascending order, and then by “height” in descending order.
>>> from tiled.client import ASCENDING, DESCENDING >>> tree.sort(("color", ASCENDING), ("height", DESCENDING))
Note that
1
may be used as a synonym forASCENDING
, and-1
may be used as a synonym forDESCENDING
.