Re: [myhdl-list] Constant ints in interfaces
Brought to you by:
jandecaluwe
From: SHEN C. <she...@co...> - 2015-03-16 12:51:03
|
On 2015-03-16 20:09, Henry Gomersall wrote: > On 16/03/15 12:01, SHEN Chen wrote: > >> For instance, do you think it's a good idea to have a Interface base >> class, and requires all interface to derive from the base class? > > This would seriously limit future potential, and restricts one's > ability > to use 3rd party classes - e.g. which I keep banging on about, > IntEnum. > > All objects are interfaces! > I guess by the last statement you meant that all objects that has attributes derived from _Signal are interfaces. Obviously there are also list of signals. How about dict of signals? How about nesting, i.e. objects' attributes that are objects? I hope there is a spec on supported features. Btw, starting from Python2.2, new-style classes (derived from object) are just like built-in python types. So you really need to scan everything of everything in an object to extract all possible symbols. The Interface base-class idea was meant to simplify the scan. Of course, I only spent very little time on this, not sure if it's good or crappy idea. Sorry I didn't catch the discussion on IntEnum. Any pointer to previous discussions in the mail archive? regards, shenchen |