Casts on handles
See original GitHub issueMost leaf handle types (ConstantObject
and NonConstantObject
and it’s children) have cast overloads associated with them which do the convenience behavior of cast(handle.value)
. This works for int
, str
, and float
on objects that support them. What’s missing is bool
, it was assumed because the previous worked, that a bool
cast on a VHDL Boolean
object would as well. Instead it uses the default behavior for bool on a value which means it always evaluates to True
.
I don’t think we should add __bool__
, but instead remove the other interfaces to maintain consistency. The actual operation it offers is trivial. Forcing the users to use handle.value
instead makes reading and writing to handles more obvious when reviewing source code.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
The Cast Handle | Performance Health
The Cast Handle works with both casts and braces to help make moving easier. The adjustable loops on the thigh and calf fasten...
Read more >Casting Custom Aluminum Drawer Handles - YouTube
In this video, I am making some custom cast aluminum drawer pulls I designed for an up coming project. I will use Renshape...
Read more >Stainless Steel Cast Handles | MISUMI
Check out the variety of configurable, Stainless Steel Cast Handles products of MISUMI. MISUMI has other mechanical components, Press Die, and Plastic Mold ......
Read more >Cast Brass Handle - Etsy
Check out our cast brass handle selection for the very best in unique or custom, handmade pieces from our shops.
Read more >The Cast Handle, Leg Lifter for Casts & Braces - Amazon.com
The Cast Handle has proven useful in assisting individuals who suffer from partial or total leg paralysis through injury to the Spinal cord,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#1510 fixes the issue from the last comment. Willrevisit this.
With that solution, cocotb would complain always in the first case, even though that usage is technically correct. The warning could mention “use
if handle is not None:
”, but with any solution someone has to change their code to not get an earful.