summaryrefslogtreecommitdiff
path: root/python/typecontainer.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/typecontainer.py')
-rw-r--r--python/typecontainer.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/typecontainer.py b/python/typecontainer.py
index 1a62dbe7..b4a9e794 100644
--- a/python/typecontainer.py
+++ b/python/typecontainer.py
@@ -66,6 +66,16 @@ class TypeContainer:
def __repr__(self):
return f"<type container {self.name}>"
+ @classmethod
+ def empty(cls):
+ """
+ Get an empty Type Container which contains no types (immutable)
+ Useful when a function requires a Type Container but you don't have one.
+ :return: Empty type container
+ """
+ handle = core.BNGetEmptyTypeContainer()
+ return TypeContainer(handle=handle)
+
@property
def id(self) -> str:
"""