Unfortunately that didn't seem to work. I got the following error after the
change:
>>> a = Foo()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "foo.pyx", line 7, in foo.Foo.__cinit__ (foo.c:388)
self.count += 1
AttributeError: 'foo.Foo' object attribute 'count' is read-only
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.
2009/6/2 Cristi Constantin <[email protected]>
>
> Good day.
> You should try self.count += 1 instead of Foo.count += 1.
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev