[IronPython] Extension methods in python
miha.valencic at gmail.com
Thu Nov 6 18:07:57 CET 2008
Marty, from what I understand you are passing a variable into python engine
and want extension methods there? You can use something like that:
return self.upper()+' FooBarBaz'
a = MyString("Hello world!");
That would print "HELLO WORLD! FooBarBaz.
You can't put methods on System.String though, but you can create new object
2008/11/5 Marty Nelson <Marty.Nelson at symyx.com>
> Is there the equivalent of extension method in python? I want to put a
> variable into the script scope and create extension methods for it. Does
> this make sense and is it possible?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users