Unfortunately that didn&#39;t seem to work. I got the following error after the change:<div><br><div><div>&gt;&gt;&gt; a = Foo()</div><div>Traceback (most recent call last):</div><div>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;</div>
<div>  File &quot;foo.pyx&quot;, line 7, in foo.Foo.__cinit__ (foo.c:388)</div><div>    self.count += 1</div><div>AttributeError: &#39;foo.Foo&#39; object attribute &#39;count&#39; is read-only</div><div><br></div><div><br>
</div><div>To clarify, I want the value of the count variable to remain the same between all instances. So if I create 3 Foo objects, each object should show 3 as the value in the count variable.</div><div><br></div><br><div class="gmail_quote">
2009/6/2 Cristi Constantin <span dir="ltr">&lt;<a href="mailto:darkgl0w@yahoo.com">darkgl0w@yahoo.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><br>Good day.<br>You should try <span style="font-weight:bold">self.count += 1</span> instead of Foo.count += 1.<br></td></tr>
</tbody></table></blockquote></div><br></div></div>