Skip to content

Python Enum Functionality in LEAN #8627

Description

@ArthurAsenheimer

Expected Behavior

LEAN's enum objects behave like real enums.

Actual Behavior

Currently, all of LEAN's enums behave like integers in Python.
This causes incorrect results with isinstance checks and usage of the is operator.

Potential Solution

Upgrading to pythonnet 3.0.0 or higher should address these limitations according to this discussion.

Reproducing the Problem

Take a look at the jupyter-notebook here.

System Information

QC Cloud

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions