In trying to unify the linear algebra syntax, I came across the 
following behavior:


sage: a=matrix(2,range(4))
sage: a.nrows()
2
sage: a._nrows
---------------------------------------------------------------------------
<type 'exceptions.AttributeError'>        Traceback (most recent call last)

/home/grout/sage/devel/sage-main/sage/misc/<ipython console> in <module>()

<type 'exceptions.AttributeError'>: 
'sage.matrix.matrix_integer_dense.Matrix_integer_de' object has no 
attribute '_nrows'
sage: a.__dict__
---------------------------------------------------------------------------
<type 'exceptions.AttributeError'>        Traceback (most recent call last)

/home/grout/sage/devel/sage-main/sage/misc/<ipython console> in <module>()

<type 'exceptions.AttributeError'>: 
'sage.matrix.matrix_integer_dense.Matrix_integer_de' object has no 
attribute '__dict__'


I noted that the nrows() function just returned self._nrows.  So how 
come I can't access _nrows?  Does it have to do with Cython and inheritance?

Thanks,

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to