[IronPython] Choosing the right overload

Dino Viehland dinov at exchange.microsoft.com
Fri Jun 16 21:05:17 CEST 2006

The next release this should actually be considerably better.  We've made some fairly significant changes to method binding to be closer to C# and VB's rules, and we've also added a new Reference type that you can use to explicitly call methods w/ ref or out params.  So hopefully you won't have to deal with the insanity for too long.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan Jacobs
Sent: Friday, June 16, 2006 10:33 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Choosing the right overload

Jonathan Jacobs wrote:
> I did some digging in the source code, it looks like the problem is
> the indexer for BuiltinFunctionOverloadMapper. The problem appears to
> be: from Python I am unable to specify whether an argument is byref or
> not and so the comparison fails when trying to match signatures.

I did a little less digging and a little more thinking:

 >>> Direct3D.Mesh.FromFile.__overloads__[(str, Direct3D.MeshFlags, Direct3D.Device, clr.GetClrType(Direct3D.ExtendedMaterial).MakeArrayType().MakeByRefType())]
<built-in function FromFile>

Yay! Somewhat insane, but yay.


When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
                 -- Rinzai, ninth century Zen master _______________________________________________
users mailing list
users at lists.ironpython.com

More information about the Ironpython-users mailing list