|
15 | 15 |
|
16 | 16 | import mathics.core.parser.operators |
17 | 17 | from mathics.core.builtin import ( |
18 | | - OPERATOR_DATA, |
19 | 18 | NoMeaningInfixOperator, |
20 | 19 | NoMeaningPostfixOperator, |
21 | 20 | NoMeaningPrefixOperator, |
22 | 21 | ) |
| 22 | +from mathics.core.parser.operators import OPERATOR_DATA |
23 | 23 |
|
24 | 24 | # Generate no-meaning Mathics3 Builtin class from the operator name, |
25 | | -# affix, and Operator Unicode values found read from the JSON operators |
26 | | -# file. |
| 25 | +# affix, and Operator Unicode values found in OPERATOR_DATA. This |
| 26 | +# data ultimately comes from a YAML file in the MathicsScanner project |
| 27 | +# which is processed into a JSON file. |
| 28 | + |
27 | 29 | for affix, format_fn, operator_base_class in ( |
28 | 30 | ("infix", "Infix", NoMeaningInfixOperator), |
29 | 31 | ("postfix", "Postfix", NoMeaningPostfixOperator), |
30 | 32 | ("prefix", "Prefix", NoMeaningPrefixOperator), |
31 | 33 | ): |
32 | | - for operator_name, operator_string in OPERATOR_DATA[ |
| 34 | + for operator_name, operator_tuple in OPERATOR_DATA[ |
33 | 35 | f"no-meaning-{affix}-operators" |
34 | 36 | ].items(): |
35 | 37 | # Create the Mathics3 Builtin class... |
| 38 | + operator_string = operator_tuple[0] |
36 | 39 | generated_operator_class = type( |
37 | 40 | operator_name, |
38 | 41 | (operator_base_class,), |
|
0 commit comments