私は次のクラスを持っています:
Help on class A in module a:
class A(__builtin__.object)
| Methods defined here:
|
| any vegetable(self)
| TODO document this
|
| getHeight(self)
| uses the chicken to measure it
呼び出しany vegetable
が機能しません:
>>> a.A().any vegetable()
File "<stdin>", line 1
a.A().any vegetable()
^
SyntaxError: invalid syntax
どうすれば電話できますany vegetable
か?
わかりました、もっと証拠を提出しなければならないなんて信じられませんが、ここに行きます。
>>> dir(a.A)
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'any vegetable', 'getHeight']
これは私のクラスではないので、書き直すように言わないでください。メソッドを呼び出すだけです。