UserSpace.sort_cells#

UserSpace.sort_cells()[source]#

Sort child cells alphabetically

Cells in the sub space that are inherited from this space, exept for those that are inherited from other base spaces prior to this space, are sorted as well.

Example

Suppose the space s2 below inherits from s1, and cells eee and ccc are defined in s2:

>>> s1.cells
{ddd,
 bbb,
 aaa}

>>> s2.cells
{ddd,
 bbb,
 aaa,
 eee,
 ccc}

>>> s1.sort_cells()

>>> s1.cells
{aaa,
 bbb,
 ddd}

>>> s2.cells
{aaa,
 bbb,
 ddd,
 eee,
 ccc}

>>> s2.sort_cells()

>>> s2.cells
{aaa,
 bbb,
 ddd,
 ccc,
 eee}

New in version 0.17.0.