Skip to content

add methods to query representation of symbolic expressions #7603

Description

@burcin

Attached patch adds _is_symbol(), _is_constant() and _is_numeric() methods to sage.symbolic.expression.Expression objects.

These methods are just a thin wrapper around the is_a<*>() methods from pynac. They should provide a straightforward interface to query the internal representation of a symbolic expression when .operator() returns None.

Some relevant discussion on sage-devel:

http://groups.google.com/group/sage-devel/msg/6323b473af195bc7

CC: @sagetrac-fmaltey

Component: symbolics

Author: Burcin Erocal

Reviewer: Mike Hansen

Merged: sage-4.3.rc0

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

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions