Opened 5 years ago
Last modified 5 years ago
#21070 new defect
comparison with wildcard raises error
Reported by: | dkrenn | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.3 |
Component: | symbolics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
sage: w = SR.wild() sage: {a*w+b: 0 for a in [1, 2] for b in [1, 2]}
results in a TypeError?
... TypeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.
This seems to be a problem with comparison as:
sage: w = SR.wild() sage: bool(w == 1)
results in the same error.
Change History (2)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Better still, in __nonzero__
check early for wildcards in equations and use (lhs-rhs).is_trivial_zero()
.
Note: See
TracTickets for help on using
tickets.
Up to now noone thought about what happens if wildcards are compared. That Python's
dictcomp
callsExpression.__nonzero__
is problematic is nothing, new but it was just a performance problem. Now we need to make sure in the Maxima interface that no wildcards slip through.