How are methods, `classmethod`, and `staticmethod` implemented in Python?
问题 At what point do methods in Python acquire a get property? —As soon as they're defined in the class? Why does Python let me define a method without any arguments (not even a first self argument)? I know how to use classmethod and staticmethod , and I know that they're built-in functions, but what happens to a function that is so-decorated? Essentially, I'm wondering about the "magic" that happens between class definition and class construction. 回答1: Check this out. http://docs.python.org