-
Notifications
You must be signed in to change notification settings - Fork 748
String Representation of an Enum #575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@jaredbroad the problem here is that C# enum is converted to its value (int) before you can do anything with this enum in Python. Here are possible fixes for similar issue, that I suggested before: |
Current @denfromufa suggested several approaches to support better enum
What about using IntEnum? According to the docs, special casing enums may not be at all required as |
@aparamon this would work only in Python 3 which is ok. This contribution is welcome! |
Enums are enums in .NET - this is a very weird decision to replace with integers. Are we back to the 'error code days' ? |
Contributions are welcome. Python.NET is a very old library, dating back to Python 2.2 (I think), |
I tried to replicate this issue because I'd like to contribute but this seems to work for .net versions greater than 4.6 |
Environment
Details
Is it possible to get the text string name instead of the integer?
The text was updated successfully, but these errors were encountered: