hanchenye-llvm-project/lldb/third_party/Python/module
Zachary Turner 059e52c44c Python 3 - Fix some issues with class / instance variables in unittest2.
Explanation from a Python wizard (not me) about why this exhibited
different behavior under Python 2 and Python 3.

    `cmp` is a builtin_function_or_method in Python 2.7, which doesn't
    have a __get__ and doesn't qualify as a "descriptor".  Your lambda is a
    regular function which qualifies as a descriptor whose __get__ method
    returns a bound instance.

His suggested fix was to write

    sortTestMethodsUsing = staticmethod(cmp_)

However, I don't think `sortTestMethodsUsing` (or any of the other fields
of `TestLoader`) should be class attributes anyway.  They are all accessed
through self, so they should be instance attributes.  So the fix employed
here is to convert them to instance attributes.

Differential Revision: http://reviews.llvm.org/D14453
Reviewed By: Todd Fiala

llvm-svn: 252346
2015-11-06 21:37:07 +00:00
..
pexpect-2.4
progress Preparation for turning lldbsuite into a Python package. 2015-10-27 22:33:47 +00:00
six
unittest2/unittest2 Python 3 - Fix some issues with class / instance variables in unittest2. 2015-11-06 21:37:07 +00:00