Constructor problem

Nick mediocre_person at hotmail.com
Thu Oct 28 19:05:23 EDT 2004


Nick wrote:
> I'm writing a simple class to represent a deck of cards. Here is the 
> stripped down version. Notice classes Deck and Deck2. Class Deck works, 
> Deck2 does not. My thinking is that it should be more efficient (a la 
> Deck2) to pre-create the list, and then modify it, rather than appending 
> Cards as in Deck.
> 
Thanks for the replies... I smack my head in dismay.




More information about the Python-list mailing list