Simplifies _print_hex method

Simplifies the `_print_hex` method.

Note that there are ~4 different ways of implementing it:
```
In [1]: def a(x):
   ...:     return hex(x).rstrip('L')
   ...: def b(x):
   ...:     s = hex(x)
   ...:     return s[0:-1] if s.endswith("L") else s
   ...: def c(x):
   ...:     return '0x%x' % x
   ...: def d(x):
   ...:     return '0x{:x}'.format(x)
```
This commit is contained in:
Disconnect3d
2019-07-19 00:04:12 +02:00
committed by GitHub
parent dc8f62dc8b
commit effebe27f7
+1 -2
View File
@@ -694,8 +694,7 @@ class IDAPython_displayhook:
storage.append(str(item))
def _print_hex(self, x):
s = hex(x)
return s[0:-1] if s.endswith("L") else s
return hex(x).rstrip('L')
def displayhook(self, item):
if item is None or type(item) is bool: