Replacement
Replacement
Replacement()A replacement of a pattern by a right-hand side.
Methods
| Name | Description |
|---|---|
__new__ |
Create a new replacement |
__new__
Replacement.__new__(
pattern: Expression | int | float | complex | Decimal,
rhs: HeldExpression | Expression | Callable[[dict[Expression, Expression]], Expression] | int | float | complex | Decimal,
cond: Optional[PatternRestriction | Condition] = None,
non_greedy_wildcards: Optional[Sequence[Expression]] = None,
min_level: int = 0,
max_level: Optional[int] = None,
level_range: Optional[Tuple[int, Optional[int]]] = None,
level_is_tree_depth: bool = False,
partial: bool = True,
allow_new_wildcards_on_rhs: bool = False,
rhs_cache_size: Optional[int] = None,
) -> ReplacementCreate a new replacement. See replace for more information.