pathex.expressions.repetitions.repetition module

class Repetition(argument: object, lower_bound: int = 0, upper_bound: int | float | ... = inf)[source]

Bases: pathex.expressions.expression.Expression

This class represents a repetition.

argument: object

The expression to be repeated

lower_bound: int = 0

The minimum amount of repetitions to be produced

upper_bound: int | float | ... = inf

The amount of repetitions to be produced. If it is math.inf, it is assumed to be infinite