title: Python assert isinstance() Vector
body: <p>I am trying to implement a Vector3 class in python. If I would write the Vector3 class in c++ or c# i would have X, Y, and Z members stored as floats but in python I read that ducktyping is the way to go. So according to my c++/c# knowledge I wrote something like this:</p>
  
  <pre><code>class Vector3:
      def __init__(self, x=0.0, y=0.0, z=0.0):
          assert (isinstance(x, float) or isinstance(x, int)) and (isinstance(y, float) or isinstance(y, int)) and \
                 (isinstance(z, float) or isinstance(z, int))
          self.x = float(x)
          self.y = float(y)
          self.z = float(z)
  </code></pre>
  
  <p>The question is regarding the assert statements: Would you use them or not in this instance (a Vector3 implementation for math). I also used it for the operations like</p>
  
  <pre><code>def __add__(self, other):
      assert isinstance(other, Vector3)
      return Vector3(self.x + other.x, self.y + other.y, self.z + other.z)
  </code></pre>
  
  <p>Would you use assert in these instances or not? 
  According to this website : <a href="https://wiki.python.org/moin/UsingAssertionsEffectively" rel="nofollow noreferrer">https://wiki.python.org/moin/UsingAssertionsEffectively</a> it should not be overused but for me as someone who used static typing all along, not checking for the same datatype is extremely weird.</p>