Another newbie question

Kent Johnson kent at kentsjohnson.com
Thu Dec 8 17:57:12 EST 2005


Steven D'Aprano wrote:
> On Wed, 07 Dec 2005 23:58:02 -0500, Mike Meyer wrote:
>>>1)  The stmt "board.Blist[10].DrawQueen(board.Blist[10].b1)" seems
>>>awkward. Is there another way (cleaner, more intuitive) to get the
>>>same thing done?
>>
>>Yes. Reaching through objects to do things is usually a bad idea. 
> 
> 
> I don't necessarily disagree, but I don't understand why you say this. Why
> it is bad?

http://en.wikipedia.org/wiki/Law_of_Demeter

Kent



More information about the Python-list mailing list