擅长:python、mysql、java
<p><code>get_point_source_id</code>是类的方法,因此请改用<a href="http://docs.python.org/2/library/operator.html#operator.methodcaller" rel="nofollow">^{<cd2>}</a>:</p>
<pre><code>from operator import methodcaller
map(methodcaller("get_point_source_id"), points)
</code></pre>
<h2>EIDT公司:</h2>
<p>我怎么知道我知道什么?</strong></p>
<p>安装<a href="http://ipython.org/" rel="nofollow">ipython</a>,在ipython qtconsole中,使用<code>*</code>和<code>?</code>magics搜索与给定模式匹配的所有属性:</p>
<pre><code>In [356]: import operator
In [357]: operator.*attr*?
operator.__delattr__
operator.__getattribute__
operator.__setattr__
operator.attrgetter
In [358]: operator.*meth*?
operator.methodcaller
</code></pre>