Skip to content

perhaps symbolic expressions should not have a length #29738

@DaveWitteMorris

Description

@DaveWitteMorris

This ticket was opened to ensure that an issue raised in the comments of #10980 is not lost when that ticket is closed.

From a mathematical viewpoint, it makes sense to talk about the length of a symbolic expression:

sage: len(2*x^2 + 3*x - 5)
3

However, this is does not seem pythonic, because only container-type objects should have a len. Therefore, it was suggested in the comments of #10980 that it might be a good idea to take away the len from symbolic expressions (and this could be discussed on sage-devel).

#24080, which had proposed to add indexing, was closed as wontfix.

Related ticket: #28053 (adding length of a propositional formula function in the Logic Module)

Depends on #32139

CC: @behackl @slel @dkrenn @saliola @orlitzky

Component: symbolics

Keywords: length

Author: Matthias Koeppe

Branch/Commit: 86b0108

Reviewer: Daniel Krenn, Michael Orlitzky

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions