[Numpy-discussion] matrix indexing question

Alan G Isaac aisaac@american....
Sun Mar 25 20:00:13 CDT 2007

> On 3/26/07, Alan G Isaac <aisaac@american.edu> wrote: 
>> finds itself in basic conflict with the idea that I ought 
>> to be able to iterate over the objects in an iterable 
>> container. 

>> I mean really, does this not "feel" wrong? :: 

>>     >>> for item in x: print item.__repr__() 
>>     ... 
>>     matrix([[1, 2]]) 
>>     matrix([[3, 4]]) 

On Mon, 26 Mar 2007, Bill Baxter apparently wrote: 
> This may sound silly, but I really think seeing all those 
> brackets is what makes it feel wrong.

I appreciate the agreement that it feels wrong, but 
I dispute the analysis of this symptom.  What makes it "feel 
wrong", I contend, is that experience with Python make this 
a **surprising** behavior.  And that is precisely why 
I suggest that this may point to a design issue.

Alan Isaac

More information about the Numpy-discussion mailing list