terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
214 stars 82 forks source link

Removing the non-Python term class method #1617

Closed john-science closed 5 months ago

john-science commented 5 months ago

What is the change?

Removing the non-Python term class method

Why is the change being made?

In Python, a "method" is a "function" that is part of a class. That is how those two terms are defined in Python. In other languages, those words mean slightly different things, sometimes.

In Python, the only time you say "class method", is if you use the @classmethod decorator. So, this PR cleans up the language in a few places.


Checklist

mgjarrett commented 5 months ago

I think "class method" is a python term, although it is used incorrectly in some of the instances in this PR. The term "class method" appears many times in the python docs. The meaning as I understand it at a high-level is a method that is bound to a class rather than an instance of a class.

https://docs.python.org/3/reference/datamodel.html#special-method-names

image

john-science commented 5 months ago

I think "class method" is a python term, although it is used incorrectly in some of the instances in this PR. The term "class method" appears many times in the python docs. The meaning as I understand it at a high-level is a method that is bound to a class rather than an instance of a class.

Well, in Python there is classmethod, of course. but I don't think any of these are that.