__repr__ not called for subclasses of 'int' in hex view
See original GitHub issueThe screenshot is pretty self-explanatory. I should see test
, but in Hexadecimal Display, I see 0x0
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
subclassing int to attain a Hex representation - python
__repr__ is used when repr(o) is called, and to display a value at the interactive prompt. __str__ is called for most instances of ......
Read more >How To Use the __str__() and __repr__() Methods in Python
This method is called by the built-in repr() function. ... only the class and the object id in hexadecimal format, which is not...
Read more >Python repr()
The repr() function returns a printable representation of the given object. In this tutorial, we will learn about Python repr() in detail with...
Read more >Built-in Functions — Python 3.11.4 documentation
The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical...
Read more >Built-in Types — Python 3.11.4 documentation
The principal built-in types are numerics, sequences, mappings, classes, ... integer literals (including hex, octal and binary numbers) yield integers.
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 Free
Top 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
That’s something to consider, especially as we’re working on
ptvsd
right now to make it more of a “visible” thing. Currently we don’t support any use of it beyond enabling attach for remote debugging (and if you’re doing local F5 debugging then you shouldn’t import it at all).We have a new debug engine in the 15.8 release, if you still see this problem, please open an issue at https://github.com/Microsoft/ptvsd