tiled.client.node.Node.sort

Node.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 for ASCENDING, and -1 may be used as a synonym for DESCENDING.