Opened 4 years ago

Last modified 3 years ago

#19464 closed defect

ExpressionTreeWalker fails on some functions — at Version 1

Reported by: rws Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by rws)

In some tickets (eg #15024, #19464) this doctest from symbolic/expression_conversions.py

            sage: foo = random_expr(20, nvars=2)
            sage: foo
            sage: s = ExpressionTreeWalker(foo)
            sage: bool(s() == foo)

fails because the set of functions returned by random_expr contains one of floor/ceil which currently don't accept the hold keyword:

sage: floor(x,hold=True)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-fc5809e0a430> in <module>()
----> 1 floor(x,hold=True)

TypeError: __call__() got an unexpected keyword argument 'hold'

This would affect any use of the walker or its subclasses on floor expressions.

Change History (1)

comment:1 Changed 4 years ago by rws

  • Description modified (diff)
Note: See TracTickets for help on using tickets.