title: Verify the center of circle instance is a Point object, not tuple
body: <p>The Circle class takes Point object as the center of circle.
  To verify the center of the circle instance is a Point object, I added an if not isinstance() statement in <strong>init</strong>. This if statement raises TypeError when center is not a Point object. </p>
  
  <pre><code>def __init__(self, center=(0,0), radius=1):
          Point.__init__(self,center)
          self.center=center
          self.radius=radius
          if not isinstance(center,Point):
              raise TypeError("The center must be a Point!")
  </code></pre>
  
  <p>However, the code seems to accept any tuple in the form of (x,y) to be Point object. Is there a way to only pass the Point object to be center and anything else any tuple to be TypeError? </p>
  
  <p>The desired output is shown in the following:</p>
  
  <pre><code>&gt;&gt;&gt; circle  =   Circle(center=4,    radius=1.5) 
  [Traceback...] 
  TypeError:  The center  must    be  a   Point!
  &gt;&gt;&gt; circle  =   Circle(center=Point(3,4),   radius=2) 
  &gt;&gt;&gt; circle.center   =   (3, 4) 
  [Traceback...] 
  TypeError:  The center  must    be  a   Point!
  </code></pre>
  
  <p>The following is the code for Point class:</p>
  
  <pre><code>import math
  class Point:
      def __init__(self,x=0,y=0):
          self.x = x
          self.y = y
          self.data=[x,y]
      def __getitem__(self, index):
          return self.data[index]
      def __iter__(self):
          yield self.x
          yield self.y
      def __add__(self,other):
          return Point(self.x+other.x,self.y+other.y) 
      def __mul__(self,n):
          return Point(self.x*n,self.y*n) 
      def __rmul__(self,n):
          return Point(n*self.x,n*self.y) 
      @classmethod
      def from_tuple (cls, self=(0,0)):
          return cls(*self)   
      def loc_from_tuple(self,t=(0,0)):
          self.x=t[0]
          self.y=t[1] 
      def __str__(self):
          return "Point at ({0}, {1})".format(self.x,self.y)  
      def __repr__(self):
          return"Point(x={0}, y={1})".format(self.x,self.y)   
  </code></pre>
  
  <p>The following is class Circle</p>
  
  <pre><code>class Circle(Point):
      def __init__(self, center=(0,0), radius=1):
          Point.__init__(self,center)
          self.center=center
          self.radius=radius
          if not isinstance(center,Point):
              raise TypeError("The center must be a Point!")
  
      def __getitem__(self,item):
          return self.center[item]
      def __str__(self):
          return "Circle with center at ({0}, {1}) and radius {2}".format(self.center.x, self.center.y, self.radius)
      def __repr__(self):
          return "Circle(center=Point({0}, {1}), radius={2})".format(self.center[0],self.center[1],self.radius)
      def __add__(self,other):
          return Circle(
          Point(self.center.x+other.center.x,
          self.center.y+other.center.y),
          self.radius+other.radius)
      @classmethod
      def from_tuple(cls, center,radius):
          return cls(center, radius)
      @property
      def radius(self):
          return self._radius
      @radius.setter
      def radius(self, radius):
          if radius&lt;0:
              raise ValueError('The radius cannot be negative')
          self._radius=radius
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/n9goy.png" rel="nofollow noreferrer">This is what I am getting.</a></p>