Python Forum
Having trouble writing an Enum with a custom __new__ method
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having trouble writing an Enum with a custom __new__ method
#4
Why not? Their value is a string. If I want an enum that has integer values I used use an IntEnum.
Reply


Messages In This Thread
RE: Having trouble writing an Enum with a custom __new__ method - by deanhystad - Feb-13-2022, 06:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable sorting methods for Enum DataClasses koen 1 806 May-30-2023, 07:31 PM
Last Post: deanhystad
  Custom method to handle exceptions not working as expected gradlon93 3 1,072 Dec-22-2022, 07:12 PM
Last Post: deanhystad
  Alarm system with state, class, enum. Frankduc 0 1,290 May-04-2022, 01:26 PM
Last Post: Frankduc
  Enum help SephMon 3 1,536 Nov-19-2021, 09:39 AM
Last Post: Yoriz
Smile Set 'Time' format cell when writing data to excel and not 'custom' limors 3 6,375 Mar-29-2021, 09:36 PM
Last Post: Larz60+
  Trouble writing over serial EngineerNeil 1 2,674 Apr-07-2019, 08:17 PM
Last Post: j.crater
  enum from typelib Erhy 2 2,173 Jan-26-2019, 05:37 PM
Last Post: Erhy
  Python error? Enum and strings tycarac 3 3,615 Dec-15-2018, 10:39 AM
Last Post: tycarac
  trouble writing to file after while loop Low_Ki_ 21 13,514 Jan-10-2017, 06:44 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020