JDevlieghere marked 3 inline comments as done.
JDevlieghere added inline comments.
================
Comment at: lldb/packages/Python/lldbsuite/test/lldbinline.py:209
test_class = type(name, (InlineTest,), dict(test=test_func,
- name=name, _build_dict=build_dict))
+ name=name, __inline_name__=name, _build_dict=build_dict))
----------------
labath wrote:
> JDevlieghere wrote:
> > labath wrote:
> > > `__inline_name__` is not a good name according to
> > > <https://www.python.org/dev/peps/pep-0008/>:
> > > ```
> > > __double_leading_and_trailing_underscore__: "magic" objects or attributes
> > > that live in user-controlled namespaces. E.g. __init__, __import__ or
> > > __file__. Never invent such names; only use them as documented.
> > > ```
> > >
> > I did it for consistency with `__no_debug_info_test__`. Based on that PEP
> > we should rename it to `__no_debug_info_test`?
> I think a single underscore should be enough. I am not sure the mangling
> magic invoked by a double underscore will work for this case:
> ```
> Note 2: Name mangling can make certain uses, such as debugging and
> __getattr__(), less convenient.
> ```
> The PEP is very cautious about (not) encouraging double underscores, and a
> single leading underscore already says this is private.
Alright, I'll fix that in a follow-up commit. I just wasn't sure if we relied
on it, but if we do we'll find out ;-)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81516/new/
https://reviews.llvm.org/D81516
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits