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.

`ConstantObject.value` does not return BinaryValue anymore

See original GitHub issue

Starting from ef3c212f21f35caeb1d246079d4521a0ed2ca505, accessing value on a ConstantObject now returns (in my test) an int, while it previously returned a BinaryValue.

This breaks this test in my PR, as the returned int object does not have a integer attribute.

Is it an expected result of ef3c212f21f35caeb1d246079d4521a0ed2ca505?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ktbarrettcommented, Sep 22, 2020

No, there currently isn’t, but there should be.

High-level there is:

  • logic and bit vector like objects return BinaryValue
  • integer objects return int
  • real objects return float
  • string objects return bytes
  • multi-dimensional vectors of logic or bits return lists of BinaryValue (@garmin-mjames added this recently)
  • other hierarchy objects don’t implement .value and will raise an exception

The .value types should be the same for both ConstantObject and the subclasses of ModifiableObject.

0reactions
cornacommented, Sep 23, 2020

Thanks @ktbarrett, this helps a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C++ Return value, reference, const reference - Stack Overflow
Returning by value means that you are returning a copy of an object. This puts requirements on the class (it has to be...
Read more >
AWS S3 can't read binary data anymore - MongoDB
Hi there. I'm having trouble updating from third party services to bpm modules. I updated my uploadImageToS3 code, taken from the O-FISH ...
Read more >
Parsing arguments and building values — Python 3.11.1 ...
Like s* , except that it doesn't accept mutable objects. The result is stored into two C variables, the first one a pointer...
Read more >
const - JavaScript - MDN Web Docs - Mozilla
The const declaration creates a read-only reference to a value. It does not mean the value it holds is immutable—just that the variable ......
Read more >
Understanding Python Bytecode - Towards Data Science
So what the compile function is returning is a code object (the address after ... we do not need the returned value of...
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