summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorverylazyguy <verylazyguy@hotmail.com>2022-04-11 13:29:40 -0400
committerPeter LaFosse <peter@vector35.com>2022-04-11 14:26:45 -0400
commit1f6b9d5b2ca5a4695d50835f65fc04f9db2e16f9 (patch)
tree270bfc005abc379094428612c3cc553db86d126e /python
parent31f31e8919906ce04e4fafbcf9138a5eb96e8665 (diff)
- have SymbolMapping accept default for `get()` method
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 84a415e2..6fee5c1d 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -1492,11 +1492,11 @@ class SymbolMapping(collections.abc.Mapping): # type: ignore
assert self._symbol_cache is not None
return self._symbol_cache.values()
- def get(self, value):
+ def get(self, value, default = None):
try:
return self[value]
except KeyError:
- return None
+ return default
class TypeMapping(collections.abc.Mapping): # type: ignore