擅长:python、mysql、java
<p>我很确定pipes.quote已损坏,不应使用,因为它无法正确处理零长度参数:</p>
<pre><code>>>> from pipes import quote
>>> args = ['arg1', '', 'arg3']
>>> print 'mycommand %s' % (' '.join(quote(arg) for arg in args))
mycommand arg1 arg3
</code></pre>
<p>我相信结果应该是</p>
<pre><code>mycommand arg1 '' arg3
</code></pre>