[libre-riscv-dev] [Bug 66] a nmigen "Object" is needed that acts like a multiply-inheritable python class

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Fri Apr 19 11:17:23 BST 2019


http://bugs.libre-riscv.org/show_bug.cgi?id=66

--- Comment #3 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #2)
> (In reply to Jacob Lifshay from comment #1)
> > adapting the Data class could work well:
> > https://salsa.debian.org/Kazan-team/simple-barrel-processor/blob/master/src/
> > PipelineBuildingBlockAPIProposal.py#L24
> 
> one additional benefit, classes derived from Data interact transparently
> with Record instances.

showing that with a unit test would be good.  also, i think it would
be a good idea to keep Data's public API as closely mirroring nmigen
Value as possible: a constructor instead of create_data, iteration
(__iter__) instead of members(), an eq function, etc.

otherwise it breaks the principle of "least astonishment"
https://en.wikipedia.org/wiki/Principle_of_least_astonishment

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-riscv-dev mailing list