dictionary containing instances of classes behaving oddly

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Thu Dec 28 17:16:09 EST 2006


On Thu, 28 Dec 2006 09:16:18 -0800, Ben wrote:

> Hello...
> 
> I have a dictionary, where each value is a seperate instance of the
> same class:
> 
>  self.mop_list[record_number]=record(self.mops[:])

Others have already solved the immediate problem, but I'd just like to
make a brief comment about self-documenting code, in particular misleading
self-documenting code.

The O.P. says he has a DICTIONARY called mop_LIST.

[raises eyebrow]



-- 
Steven.




More information about the Python-list mailing list