[Lldb-commits] [lldb] 94af865 - [lldb] Remove Python 2 operators from lldb.value (#214296)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 7 05:49:14 PDT 2026
Author: Nerixyz
Date: 2026-08-07T14:49:03+02:00
New Revision: 94af8651da4a1b907a8ea2acb698d72aad3df722
URL: https://github.com/llvm/llvm-project/commit/94af8651da4a1b907a8ea2acb698d72aad3df722
DIFF: https://github.com/llvm/llvm-project/commit/94af8651da4a1b907a8ea2acb698d72aad3df722.diff
LOG: [lldb] Remove Python 2 operators from lldb.value (#214296)
`__nonzero__`, `__div__`, `__hex__`, and `__oct__` are from Python 2 and
not used in Python 3, so remove them.
Added:
Modified:
lldb/bindings/python/python-extensions.swig
Removed:
################################################################################
diff --git a/lldb/bindings/python/python-extensions.swig b/lldb/bindings/python/python-extensions.swig
index 8331f0aedd6f0..f207fc6c350d9 100644
--- a/lldb/bindings/python/python-extensions.swig
+++ b/lldb/bindings/python/python-extensions.swig
@@ -389,9 +389,6 @@ class value(object):
def __init__(self, sbvalue):
self.sbvalue = sbvalue
- def __nonzero__(self):
- return self.sbvalue.__nonzero__()
-
def __bool__(self):
return self.sbvalue.__bool__()
@@ -454,9 +451,6 @@ class value(object):
def __or__(self, other):
return int(self) | int(other)
- def __div__(self, other):
- return int(self) / int(other)
-
def __truediv__(self, other):
return int(self) / int(other)
@@ -556,12 +550,6 @@ class value(object):
def __float__(self):
return float (self.sbvalue.GetValueAsSigned())
- def __oct__(self):
- return '0%o' % self.sbvalue.GetValueAsUnsigned()
-
- def __hex__(self):
- return '0x%x' % self.sbvalue.GetValueAsUnsigned()
-
def __len__(self):
return self.sbvalue.GetNumChildren()
More information about the lldb-commits
mailing list