python_koans
python_koans copied to clipboard
AboutClassAttributes: Order of definition matters
Thanks for this work, I'm discovering nooks and crannies of Python that I wasn't previously aware of.
For the following section, I wanted to point out that what seems to matter is order of definition of the class attributes.
https://github.com/gregmalcolm/python_koans/blob/800cdf5db9e8539681723ca541e03b28e2117b28/koans/about_class_attributes.py#L63-L75
The classmethod and staticmethod are redefining the instance methods. If order of each of bark and growl is flipped, the instance method will redefine the static/class method.