Excuse me if this is known or not, but searching around has only turned
up articles/mailing lists posts that are two years old, but does
IronPython 2.0 support .NET attributes yet?

I've seen some examples of doing it using stub classes in C# and then
deriving from the in Python, but I'm not sure if this will work for me.
I need to put an Attribute on a class, or method, in Python that takes a
string argument. I can't think of a workaround to get this support.

For example, in C# the class would be:

class Foo
{
     [MyNameAttribute("Test name")]
     public void Method()
     {
           Console.Write("test");
     }
}

And the string "Test name" could be different for each use of
MyNameAttribute. I use it for internal registration purposes in my C# code.

How would I write this class in IP?



_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to