Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Consider removing/modifying LetterWithSubscripts #335

@bryano

Description

@bryano

The current implementation seems pretty hacky and brittle.

For one, LetterWithSubscripts('x', 1, 2) == LetterWithSubscripts('x_1_2') == LetterWithSubscripts('x', '1_2'). According to @Strilanc, this is necessary because of how poorly Sympy treats subclasses of sympy.Symbol.

One possible alternative replace the class entirely with a function letter_with_subscripts that returns a sympy.Symbol object directly with the right name. The function could set the letter and subscripts attributes of the object, but that might not play well with mypy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions