question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Most 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:open
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ktbarrettcommented, Apr 10, 2020

#1510 fixes the issue from the last comment. Willrevisit this.

1reaction
ktbarrettcommented, Dec 4, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found