designspace.IntLiteral#

class designspace.IntLiteral(lo: int, hi: int)#

Bases: object

A range of integer constants admissible in a .symbolic() tree.

The integer counterpart of FloatLiteral.

lo#

Lowest admissible constant, inclusive.

Type:

int

hi#

Highest admissible constant, inclusive.

Type:

int

Examples

>>> lit = ds.IntLiteral(0, 4)
>>> lit.lo, lit.hi
(0, 4)
property chart: Chart#

A chart over the literal’s range, for a consumer that generates trees.

Offered for convenience only: the library ships no evaluator and never draws constants itself.

Examples

>>> ds.IntLiteral(0, 4).chart.from_unit(0.5)
2