[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 22 10:30:24 PST 2022


kastiglione added inline comments.


================
Comment at: lldb/bindings/python/python-extensions.swig:528-533
+def find(pattern, flags=re.I):
+    """
+    Find matching SB methods/properties. See also Python's builtin `help()`.
+    """
+    import lldb
+    import re
----------------
oh, I need to figure out the right way to manage imports in this swig extension. It seems that the `re` module is used (as a default argument) before importing it, and yet this code works.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120292/new/

https://reviews.llvm.org/D120292



More information about the lldb-commits mailing list