« first day (1309 days earlier)      last day (2047 days later) » 

1:37 PM
-1
Q: Create Python Enum Item Dynamically

GriffinLet's say I have the following enum which represents some standard set of animals: class Animal(Enum): cat = (4, True) man = (2, True) cod = (0, False) def __init__(self, legs, is_mammal): self.legs = legs self.is_mammal = is_mammal # Some animal methods her...

 
1 message moved from Python
 

« first day (1309 days earlier)      last day (2047 days later) »