Bring object 'out of' Class?

dave squareswallower at
Sun Jun 1 23:14:44 CEST 2008

> Then you can write:
>>>> hands = deck.deal_cards(4, 5) # On fait une belotte?
> And I don't see the need of defining 'Hand' inside 'Deck'.

Thanks for the input.

I believe using 'class Hand(Deck):' is to illustrate (in the book) 
inheritance and how it can be used.  By using 'Hand(Deck)' I can then 
use the methods (pop_card, add_cards, etc..) defined in the 'Deck' 

More information about the Python-list mailing list