[IronPython] Announcing IronPython 2.0
curt at hagenlocher.org
Thu Dec 11 08:46:49 PST 2008
We don't support this in IronPython 2.0, no. And oddly, no one seems to
have added this as a "desired feature" in CodePlex, even though it's come up
a few times before on this list.
The most likely way that we'd initially provide support for this is to let
you override the "CLS backing class" that's being used to represent your
Python class -- this would mean that you'd need to do the code generation
for the attribute yourself, though.
On Thu, Dec 11, 2008 at 7:58 AM, Jeff Slutter <jslutter at reactorzero.com>wrote:
> 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()
> 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 at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users