Skip to content

Unhelpful error when conversion to Symbolic Ring fails #21007

@rwst

Description

@rwst
sage: 1/r^(1/3)
...
/home/ralf/sage/src/sage/symbolic/ring.pyx in sage.symbolic.ring.SymbolicRing._element_constructor_ (build/cythonized/sage/symbolic/ring.cpp:6620)()
    340             return prod([SR(p)**e for p,e in x], SR(x.unit()))
    341         else:
--> 342             raise TypeError
    343
    344         return new_Expression_from_GEx(self, exp)

TypeError:

Fresh Sage has r defined as the R interpreter. Granted I only stumbled over this only after years but still, this exception should print r like when you do r+1 and get TypeError: unsupported operand parent(s) for '+': '<class 'sage.interfaces.r.R'>' and 'Integer Ring'.

Component: symbolics

Author: Jeroen Demeyer

Branch/Commit: 8d25768

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/21007

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions