Opened 3 years ago

Last modified 3 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 3 years ago by rws

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 3 years ago by rws

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.