Re: [myhdl-list] Setting of enum values
Brought to you by:
jandecaluwe
From: Henry G. <he...@ca...> - 2015-01-07 12:23:54
|
On 06/01/15 20:50, Henry Gomersall wrote: > On 29/12/14 18:26, Christopher Felton wrote: >>>> >> >AFAICT it doesn't acquire any state from the enum function so it could >>>> >> >just as easily be at the module level, allowing more flexible usage when >>>> >> >needing to fit the enum to an existing definition. >> >I am sure there are many ways to implement it, this may >> >not have been a use case envision or desired. We can >> >propose a modification to have the "Enum" class public >> >and then various custom functions can be created to >> >implement the codedicts, etc. I think this would provide >> >flexibility but also maintain a minimal / logical enum. > I'm keen on this. I don't see any reason why Enum should be so hard to > access. I agree enum should be kept as is. Further to this, why not just extend the existing python Enum: https://pypi.python.org/pypi/enum34 Cheers, Henry |