Re: Error in Intbv class?

Samuele Disegna <[email protected]> Thu, 3 Mar 2016 14:10:01 +0100
Newsgroups gmane.comp.python.myhdl
Message-ID <CADXD_DZ958eAQYKP03MUh21+gZ528r5Bsudma3+2S6g8AEnPkw@mail.gmail.com>
On Thu, Mar 3, 2016 at 1:14 PM, Forumulator Bing <[email protected]>
wrote:

> Hello,
>
> I may have found a potential bug in intbv:
>
> >>> a=intbv(5)[4:0]
> >>> a[6:0]=20
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/python3.4/dist-packages/myhdl/_intbv.py", line 180,
> in __setitem__
>     self._handleBounds()
>   File "/usr/local/lib/python3.4/dist-packages/myhdl/_intbv.py", line 77,
> in _handleBounds
>     (self._val, self._max))
> ValueError: intbv value 20 >= maximum 16
> >>> a
> intbv(20)
>
> It gives a ValueError, but still sets the value of a to 20. Would this be
> considered a bug since an exception is thrown?
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> myhdl-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/myhdl-list
>
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
myhdl-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/myhdl-list