[Bf-python] Matrix length incorrect
Stéphane SOPPERA
stephane.soppera at wanadoo.fr
Fri Jun 20 19:02:47 CEST 2008
> How about change this to return the number of rows and add a .size()
> method that works like len() does now?
>
According to:
http://docs.python.org/ref/sequence-types.html
"...__len__( self)
Called to implement the built-in function len(). Should return the
length of the object, an integer >= 0."
So I think __len__ should still returns the number of elements as a
single integer and size method returns a tuple (nbCols,nbRows) (or
nbRows,nbCols).
That would seems more logical to me.
Regards,
Stéphane
More information about the Bf-python
mailing list