Re: [myhdl-list] Block return values (myhdl.BlockError)
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2016-05-10 11:35:13
|
On 10/05/16 12:02, Henry Gomersall wrote: > On 10/05/16 10:45, Henry Gomersall wrote: >> On 10/05/16 10:32, Jan Decaluwe wrote: >>>> I have considered this issue for some time now >>>> and I have basically decided to leave the constraints >>>> as they are, that is, blocks should only return >>>> block and instantiator objects. >> I think your reasoning is sound. >> >> Do you object to alternative strategies for constructing Block >> operators? This could leave @block as the default usual case, with more >> esoteric cases handled by direct access to the construction of the Block >> object. This could allow the best of both worlds - simple default and >> arbitrary control if desired. > > Actually, a neat solution could be to allow optional decorator arguments > taking the class constructor and allow subclassing of _Block. > Independent of this feature, decorator arguments may be useful, but as you know a decorator without arguments behaves completely differently from a decorator with arguments. Until now, the only way I saw to handle both cases with a single decorator was with some ad-hoc check that I didn't find very elegant. Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com Urubu, a static website CMS: http://urubu.jandecaluwe.com |