pathex.expressions.nary_operators.nary_operator module

class NAryOperator(*args)[source]

Bases: pathex.expressions.expression.Expression

Abstract base class for nary operators.

An nary operator must have at least one argument. This is checked in debug mode.

>>> from pathex import Union
>>> try:
...    Union()
... except AssertionError:
...    pass # Right!
... else:
...    print('Wrong!')
property args_head
property args_tail
arguments: Collection