namespace AmbigousCall
{
 using System;

 using IronPython.Hosting;

 using Microsoft.Scripting.Hosting;

 class Program
 {
  const string SRC = @"
import clr
print instance.Plain()

print instance.Plain(clr.Reference[int]())

print instance.Method[str](clr.Reference[int]())

print instance.Method[str]()
";
  static void Main(string[] args)
  {
   ScriptEngine engine = Python.CreateEngine();
   ScriptScope mainScope = engine.CreateScope();

   mainScope.SetVariable("instance", new TwoMinded());

   engine.Execute(SRC, mainScope);

   Console.ReadLine();
  }
 }

 public class TwoMinded
 {
  public int Plain() { return 1; }

  public int Plain(out int anotherInt)
  {
   anotherInt = 2;
   return 3;
  }

  public T Method<T>() { return default(T); }

  public T Method<T>(out int anotherInt)
  {
   anotherInt = 0;
   return default(T);
  }
 }
}

Add a code snippet to your website: www.paste.org