擅长:python、mysql、java
<p>您忘记在<code>near</code>函数中传递<code>self</code></p>
<p><code>def near(self, val1, val2):</code></p>
<p><a href="https://stackoverflow.com/questions/12179271/python-classmethod-and-staticmethod-for-beginner">Meaning of @classmethod and @staticmethod for beginner?</a></p>
<p><a href="https://stackoverflow.com/questions/136097/what-is-the-difference-between-staticmethod-and-classmethod-in-python">What is the difference between @staticmethod and @classmethod in Python?</a></p>