We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8cbe50 commit 21edeeaCopy full SHA for 21edeea
mathics/core/pattern.py
@@ -83,6 +83,8 @@ def create(expr: BaseElement) -> "Pattern":
83
Otherwise, if ``expr`` is an ``Atom``, create and return ``AtomPattern`` for ``expr``.
84
Otherwise, create and return and ``ExpressionPattern`` for ``expr``.
85
"""
86
+ if not isinstance(expr, (Atom, Expression)):
87
+ expr = expr.to_expression()
88
89
name = expr.get_head_name()
90
pattern_object = pattern_objects.get(name)
0 commit comments