Commit 2ffdf02
Correct LHS evaluation in SetDelayed assignment (#603)
* improving clarity in Builtin.contribute
* adding comments. adding tests
* fix test for SetDelayed. Move special case for Set with LHS a list away from the conditional.
* more on modularize assignment. assign_elementary->assign
* fixing set_eval
* adding tests for OneIdentity
* fix OneIdentity
* remove comment
* fix pytest
* fix a bug that makes that URLSave always fails
* fix WriteString standard output
* catch not known attributes in ClearAttributes and SetAttributes
* Update 'attributes' for current standards
`mathics.builtin.attributes`:
* apply -> eval
* Add WMA links add
* Class names ordered alphabetically
* Hard breaks in docstring removed
* Some incorrect references to "leaves" changed to "attributes"
`mathics.core.attributes`:
* Add short comments above flag value
* adding comments. adding tests
* fix test for SetDelayed. Move special case for Set with LHS a list away from the conditional.
* more on modularize assignment. assign_elementary->assign
* Handle optional with a first element that is not a Pattern[]
* Update examples in OneIdentity
* More pervasive use of Symbols
symbols.py:
system_symbols() -> symbol_set(); "systems_symbols" name is too close
Symbol( System` to module systemsymbols. Also, we now require symbols as parameters),
not strings.
systemsymbols.py: more system symbols
* Pattern_create -> Pattern.create
It appears this was originally Pattern.create. I suspect due to bad
modularity and a lack of understandig Python that an import could be added inside the
routine, this static method got moved outside of the class.
Later on, the modularity was fixed, but the hack persisted. These kinds
of code smells side effects of poor communication.
* Add function signature; straighten import issue
* Put test_rules_patterns tests where they belong
* Add note to add skipped example as a doctest ...
When it gets fixed.
* Changes suggested in PR review
Move core-like assignment interals out of builtins and into core.
(We may want to split up core more in the future though)
Better sort long list of assignment methods alphabetically
Some small RstT tagging in a docstring
Remove nonexistent word "evaluable"
Add yet another type annotation to a signature
Make test assert failure messages unique
* Move ASSIGNMENT_FUNCTION_MAP into core
Co-authored-by: R. Bernstein <rocky@users.noreply.github.com>
Co-authored-by: rocky <rb@dustyfeet.com>1 parent 069deea commit 2ffdf02
File tree
12 files changed
+403
-306
lines changed- mathics
- builtin
- assignments
- atomic
- core
- test/builtin
12 files changed
+403
-306
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
| |||
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
21 | 60 | | |
22 | 61 | | |
23 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments