Sorry for this post... Problem solved... had nothing to do with classes

Yes but is had to do with class design. A few remarks:

  • A subclass' __init__ method must usually call the parent class' __init__.
  • PlayerHand should not be a subclass of CardDeck. You should create a common superclass, say CardList and subclass both PlayerHand and CardDeck from CardList
  • It's a bad idea for a class PlayerHand to have a member named 'player_hand' which is a list. If you define a class PlayerHand in your program, make sure that all variables named player_hand are PlayerHand instances, otherwise your code is unreadable.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.