title: Missing one required positional argument? Any idea why?
body: <p>I am trying the below problem:</p>
  
  <blockquote>
    <p>Implement a CardHand class that supports a person arranging a group of
    cards in his or her hand. The simulator should represent the sequence
    of cards using a single positional list ADT so that cards of the same
    suit are kept together. Implement this strategy by means of four
    “fingers” into the hand, one for each of the suits of hearts, clubs,
    spades, and diamonds, so that adding a new card to the person’s hand
    or playing a correct card from the hand can be done in constant time.
    The class should support the following methods:</p>
    
    <ul>
    <li>add card(r, s): Add a new card with rank r and suit s to the hand.</li>
    <li>play(s): Remove and return a card of suit s from the player’s hand; if there is no card of suit s, then remove and return an arbitrary
    card from the hand.</li>
    <li>iter (): Iterate through all cards currently in the hand.</li>
    <li>all of suit(s): Iterate through all cards of suit s that are currently in the hand.</li>
    </ul>
  </blockquote>
  
  
  
  <pre><code>class CardHand:
  """Class representing a hand of cards"""
  
      class _Card:
          """Class representing a single card"""
          suits = ['Hearts', 'Clubs', 'Diamonds', 'Spades']
          ranks= ['Ace','2','3','4','5','6','7','8','9','10','11','Jack', 'Queen', 'King']
  
          def __init__(self,suit,rank):
              self._suit = suit
              self._rank = rank
  
          def __str__(self):
              return self._rank + ' ' + self._suit
  
  
      def __init__(self):
          self._hand = PositionalList()
          self._size = 0
  
      def _validate(self,s,r):
          card = self._Card(s,r)
          if not card._suit in suits:
              raise ValueError("Such card doesn't exist")
          if not card._rank in ranks:
              raise ValueError("Invalid card value")
          return card
  
      def add_card(self,s,r):
              return  self._hand.add_first(self._Card(s,r))
  
  print(CardHand.add_card('s', '4'))  
  </code></pre>
  
  <p>I've got the code for the Positional list and its base but it's too much lines to read, so i won't post it. I've been using the same Positional list for other tasks and it's been working. Just asking if you can see why this piece of code would throw this error:</p>
  
  <blockquote>
    <p>"Missing one required positional argument "r".</p>
  </blockquote>