title: IronPython Method Overloading
body: <p>I have some IronPython code that is creating a Mutex using the following constructor:</p>
  
  <blockquote>
  <pre><code>public Mutex(
      bool initiallyOwned,
      string name,
      out bool createdNew
  )
  </code></pre>
  </blockquote>
  
  <p>Since the last parameter is an out parameter you do not pass it to the method and instead it becomes an extra return value like this:</p>
  
  <pre><code>mutex, sucess = Mutex(True, 'some_mutex')  
  </code></pre>
  
  <p>When this code runs it throws a TypeError saying that the Mutex object is not iterable. Since it is only returning one value this leads me to believe that IronPython is not choosing the correct overload. The Ironpython documentation says that you can control the exact overload that gets called by using the Overloads method on method objects.</p>
  
  <p>The following bit of code attempts that, however, I get a ValueError stating that the index was out of range:</p>
  
  <pre><code>new_mutex = Mutex.__new__.Overloads[type(True), String, type(True)]
  mutex, sucess = new_mutex(Mutex, True, 'some_mutex') 
  </code></pre>
  
  <p>If I try using the Overloads attribute to force using a different overload it executes correctly. Anyone know where I'm going wrong?</p>