[Lldb-commits] [PATCH] D14453: Python 3 - Fix some portability issues with class / instance attributes
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 6 10:34:42 PST 2015
zturner added a comment.
Derp, seems I uploaded this review twice. Now we have split threads. Anyway, there were a couple issues. The issue that was blocking me was related to the instance attributes. Specifically we were writing this:
testMethodPrefix = 'test'
suiteClass = suite.TestSuite
sortTestMethodsUsing = cmp_
_top_level_dir = None
instead of this:
def __init__(self):
self.testMethodPrefix = 'test'
self.sortTestMethodsUsing = cmp_
self.testMethodPrefix = 'test'
self._top_level_dir = None
But we were still accessing the variables as `self.sortTestMethodsUsing`. I'm not sure how this works in 2.7, but for whatever reason, it doesn't work in 3.x. `sortTestMethodsUsing` is treated as a bound method here (i.e. instance method), so it expects a `self` argument.
http://reviews.llvm.org/D14453
More information about the lldb-commits
mailing list