[PATCH] D67882: [LNT] Python 3 support: make leaf classes inherit from object

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 06:09:16 PDT 2019


hubert.reinterpretcast added a comment.

Perhaps others are more well-versed in this than I am, but I think that having a link in the commit message and using the terminology used by the documentation ("new-style" and "classic") would be useful here: https://docs.python.org/2/reference/datamodel.html#newstyle. Also, I am not sure that switching these to be new-style classes in Python 2 is necessary. I believe the commit message should give additional rationale, e.g., using new-style classes helps make the Python 2 and Python 3 behaviour of the code more similar.



================
Comment at: lnt/server/reporting/analysis.py:111
 
-    @property
-    def stddev_mean(self):
----------------
This seems to work fine if the name of the caching variable and the name of the property is not the same.


================
Comment at: lnt/server/reporting/analysis.py:121
+
+    stddev_mean = property(__get_stddev_mean, __set_stddev_mean)
 
----------------
This makes it possible to assign to the property, which was read-only before this change.


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

https://reviews.llvm.org/D67882





More information about the llvm-commits mailing list