Skip to content

Document is_expression_type and other PyomoObject methods #811

Open
@carldlaird

Description

@carldlaird

Objects within the expression system are required to implement is_expression_type. It appears that this is used to indicate if an object is a leaf in the expression tree, or something that is intended to have arguments (children). For example, NumericValue (which is definitely part of the expression system) returns False for this method. I believe this should be renamed to "has_args" or "has_children" or "is_leaf_node" to be more clear.

@whart222 Am I missing other uses for this method, or is my understanding correct?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions