Mathics3 / mathics-core

An open-source Mathematica. This repository contains the Python modules for WL Built-in functions, variables, core primitives, e.g. Symbol, a parser to create Expressions, and an evaluator to execute them.
https://mathics.org
Other
786 stars 48 forks source link

Blanks as singleton #1081

Closed mmatera closed 3 months ago

mmatera commented 3 months ago

Looking at the initialization process, Blank* PatternObjets are created several times. This PR makes that these elements be created just once when a parameter is not provided. This would also help to optimize the pattern-matching algorithm when we face that problem.

rocky commented 3 months ago

LGTM