title: Why int(string) gives value error
body: <p>I was just wondering why when I take an integer of a string like int('string') why you recieve a value error in python 3.2 and not a type error. I see the definition of a type error is defined on the python site as the follows: Raised when an operation or function is applied to an object of inappropriate type. The associated value is a string giving details about the type mismatch. </p>
  
  <p>isn't int the operator and the string is the inappropriate type? When I do this I receive a ValueError and do not understand the reason for this. </p>
  
  <p>Here is the code
  So when i instantiate the class with a rank that has a string to try and purposely get an error I receive a valueerror and not a type as I would expect. </p>
  
  <pre><code>class Card:
  
  #attributes
  list_rank=   ["","Ace","2","3","4","5","6","7","8","9","10","Jack","Queen","King"]
  list_suit={"d":"diamonds","c":"clubs","h":"hearts","s":"spades"}
  
  #initialize rank and suit
  def __init__(self,rank,suit):
  
  
  
  self.rank=int(rank)
  
  self.suit=suit
  
  
  
  
  #return the rank of the card
  def getRank(self):
      return(self.list_rank[self.rank])
  
  #return the suit of the card
  def getSuit(self):
      return(self.list_suit[self.suit])
  
  
  
  #value of the cards
  def bjValue(self):
      if(self.rank&lt;10):
          return(self.rank)
      else:
          return(10)
  
  
  #return the rank and suit of the card
  def __str__(self):
  
      return (self.list_rank[self.rank]+" of "+self.list_suit[self.suit])
  </code></pre>