mib 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
----------------
kastiglione wrote:
> mib wrote:
> > kastiglione wrote:
> > > 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.
> > Can't you just import it after the `%pythoncode %{` statement instead of 
> > doing it in the function ?
> That's what I plan to try. I figure it's best to put a `%pythoncode %{ ` at 
> the top of the file, where all imports can go, like a normal source file.
👍🏼


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120292

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to