Opened 6 years ago

Last modified 6 years ago

#21070 new defect

comparison with wildcard raises error

Reported by: Daniel Krenn 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:

Status badges


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 6 years ago by Ralf Stephan

Up to now noone thought about what happens if wildcards are compared. That Python's dictcomp calls Expression.__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.

comment:2 Changed 6 years ago by Ralf Stephan

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.