def __contains__(self, other):
        '''
        :param: Point | Segment | Ellipse class
        :return: boolean

        Returns True if the distance from the center to the point
        is less than or equal to the radius.
        '''
        otherType = type(other)

        if issubclass(otherType, Point):
            return other.distance(self.center) <= self.radius

        if issubclass(otherType, Segment):
            return (other.A in self) and (other.B in self)

        if issubclass(otherType, Circle):
            m = self.center.distance(other.center) / 2
            return (m <= self.radius) and (m <= other.radius)

        if issubclass(otherType, Ellipse):
            return (other.majorAxis in self) and (other.minorAxis in self)

        raise TypeError("unknown type '{t}'".format(t=otherType))
def __contains__ ( self , other ) : otherType = type ( other ) if issubclass ( otherType , Point ) : return other . distance ( self . center ) <= self . radius if issubclass ( otherType , Segment ) : return ( other . A in self ) and ( other . B in self ) if issubclass ( otherType , Circle ) : m = self . center . distance ( other . center ) / 2 return ( m <= self . radius ) and ( m <= other . radius ) if issubclass ( otherType , Ellipse ) : return ( other . majorAxis in self ) and ( other . minorAxis in self ) raise TypeError ( "unknown type '{t}'" . format ( t = otherType ) )
:param: Point | Segment | Ellipse class
        :return: boolean

        Returns True if the distance from the center to the point
        is less than or equal to the radius.