e, object value) {
this[name] = value;
}
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marty Nelson
Sent: Thursday, November 06, 2008 8:02 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Extension methods in python
Like a Christmas tree.
__
Like a Christmas tree.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland
Sent: Thursday, November 06, 2008 7:20 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Extension methods in python
By custom class you mean a
iha Valencic
Sent: Thursday, November 06, 2008 9:08 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Extension methods in python
Marty, from what I understand you are passing a variable into python engine and
want extension methods there? You can use something like that:
import clr
imp
nt: Thursday, November 06, 2008 9:08 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Extension methods in python
Marty, from what I understand you are passing a variable into python
engine and want extension methods there? You can use something like
that:
import clr
import System
cla
Marty, from what I understand you are passing a variable into python engine
and want extension methods there? You can use something like that:
import clr
import System
class MyString(System.String):
pass;
def ToFoo(self):
return self.upper()+' FooBarBaz'
a = MyString("Hello world!");
p
gt; "hello
world");
and then back in Python:
a.foo()
prints hello world.
Probably not what you're looking for but it's all that is there today :(
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marty Nelson
Sent: Wednesday, November 05, 2008 3:59 PM
To: Di
>> If it's an object defined in Python you can usually attach methods
directly to the object or it's Python type.
So how would this work?
Let's say I had injested a variable into the scope from c#:
scope.SetVarialble("widget", "hello world")
Can I do something in python so that I can
If it's an object defined in Python you can usually attach methods directly to
the object or it's Python type. But otherwise we have no support for
automatically adding .NET extension methods to existing types currently. It is
a frequent request and we will probably get to it at some point.
F