Hello everyone,<br><br>Please have alook at the following.<br><br>pyrex@pyrex ~/code $ pyrexc -v<br>Pyrex version <a href="http://0.9.4.1">0.9.4.1</a><br><br>pyrex@pyrex ~/code $ cat test.pyx<br>cdef class Test:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cdef int i
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cdef int y<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def __init__(self,l,k):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.i=l<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.j=k<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.x=dict()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.y=list()<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def pp(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 
self.i<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print self.j<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print self.x<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print self.y<br><br>pyrex@pyrex ~/code $ python<br>Python 2.4.3 (#1, Jul 19 2006, 01:52:32)<br>[GCC 3.4.6 (Gentoo 3.4.6-r2, ssp-3.4.6-1.0
, pie-8.7.9)]<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; import test<br>&gt;&gt;&gt; t=test.Test(1,2)<br>Traceback (most recent call last):
<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in ?<br>&nbsp; File &quot;test.pyx&quot;, line 7, in test.Test.__init__<br>&nbsp;&nbsp;&nbsp; self.j=k<br>AttributeError: 'test.Test' object has no attribute 'j'<br>&gt;&gt;&gt;<br><br><b><span class="nw" id="_user_pyrex@lists.copyleft.no">
</span></b><br>if expected? any alternatives to solve this problem. I have tried &quot;cdef object j&quot;, however in that case user will not be able to use the j when user will create an instance of the object Test.<br>
<br>Thanks in advance<br>