擅长:python、mysql、java
<p>我刚收到PyAMF首席开发人员的以下回复。这绝对是个bug:</p>
<blockquote>
<p>This is a bug in the way the Django
adapter handles non models.fields.*
properties.</p>
<p>If I do:</p>
</blockquote>
<pre><code>import pyamf
class Book(object):
def _get_number_of_odd_pages(self):
return 52
numberOfOddPages = property(_get_number_of_odd_pages)
pyamf.register_class(Book, 'Book')
encoded = pyamf.encode(Book()).getvalue()
print pyamf.decode(encoded).next().numberOfOddPages
</code></pre>
<blockquote>
<p>Then i get the correct values of 52.</p>
<p>I have created <a href="http://pyamf.org/ticket/480" rel="nofollow noreferrer">a ticket</a> for this
and will look into getting a patch a
little later.</p>
<p>Cheers,</p>
<p>Nick</p>
</blockquote>
<p><strong>更新</strong>:Nick已经修复了这个bug,它将在pyamf0.4.1中发布(应该在本周末发布)。在</p>