I seem to recall that in Seo&#39;s original code, MakeOrAdd was used to build up the overloads over time as user code asked for additional method signatures for the same method name.  This could presumably be simulated by replacing the method group in Python with a new method group that contained all the original infos plus the new one.<br>
<br><div class="gmail_quote">On Mon, Mar 23, 2009 at 11:11 AM, Dino Viehland <span dir="ltr">&lt;<a href="mailto:dinov@microsoft.com">dinov@microsoft.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Do you actually need MakeOrAdd or would the factory that takes multiple method infos be good enough?<br>
<br>
I&#39;m just reluctant to open up the ability to modify any built-in function.<br>
<div class="im"><br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</a> [mailto:<a href="mailto:users-">users-</a><br>
&gt; <a href="mailto:bounces@lists.ironpython.com">bounces@lists.ironpython.com</a>] On Behalf Of Jeff Hardy<br>
</div><div class="im">&gt; Sent: Saturday, March 21, 2009 1:17 PM<br>
&gt; To: Discussion of IronPython<br>
&gt; Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython<br>
&gt; 2.6<br>
&gt;<br>
</div><div><div></div><div class="h5">&gt; Hi Dino,<br>
&gt; I&#39;m updating Seo&#39;s old ctypes.py to work with 2.6, so unfortuantely<br>
&gt; it&#39;s a little more complex than just one method. I could probably use<br>
&gt; a delegate that takes an object[], but BuiltinFunction contains that<br>
&gt; code already, and it is a lot more optimized than I could manage. Plus<br>
&gt; it&#39;s less code for me to write :).<br>
&gt;<br>
&gt; - Jeff<br>
&gt;<br>
&gt; On Sat, Mar 21, 2009 at 11:45 AM, Dino Viehland &lt;<a href="mailto:dinov@microsoft.com">dinov@microsoft.com</a>&gt;<br>
&gt; wrote:<br>
&gt; &gt; If you only have 1 method and don&#39;t need overload resolution I&#39;d<br>
&gt; suggest making a delegate using System.Delegate.CreateDelegate.<br>
&gt; Otherwise this could be made public.<br>
&gt; &gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
&gt; <a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</div></div></blockquote></div><br>