title: Overloading functions by type
body: <p>Since python 3.5 function arguments can be declared with a type, but overloading by argument type doesn't appear to be supported. Specifically I have an old class definition</p>
  
  <pre><code>class Supplies:
      def __init__(self, supp):
          if isinstance(supp, list):
              self.food = supp[0]
              self.water = supp[1]
          else:
              self.food = supp
              self.water = supp
  </code></pre>
  
  <p>and want to convert the constructor to use type declarations. Something like this:</p>
  
  <pre><code>class Supplies:
      def __init__(self, supp: List[int]):
          self.food = supp[0]
          self.water = supp[1]
      def __init__(self, supp: int):
          self.food = supp
          self.water = supp
  </code></pre>
  
  <p>except that this overrides rather than overloads <code>__init__</code>. Is there a sensible workaround here (since it's a constructor I cannot simply use two different function names)?</p>