[IronPython] .NET Attributes
dinov at exchange.microsoft.com
Tue Mar 28 07:44:56 CEST 2006
I like this too... It's interesting that while the syntax isn't exactly the same for giving both classes & functions attributes they are both getting that information in the same way. I was previously worried about the differences between classes & functions but I think this brings it all together.
From: users-bounces at lists.ironpython.com On Behalf Of Sanghyeon Seo
Sent: Monday, March 27, 2006 8:58 PM
To: Discussion of IronPython
Subject: Re: [IronPython] .NET Attributes
2006/3/28, Sanghyeon Seo <sanxiyn at gmail.com>:
> I like __attributes__ solution.
As pointed out already, decorators can't be used with classes as of
2.4. But __attributes__ can be attached to classes or functions.
I agree that decorators would be nice. Perhaps something like the
following in clr module?
f.__attributes__ = [Foo(), Bar(1)]
cool_attributes = attributes(Foo(), Bar(1))
Just my 2c.
users mailing list
users at lists.ironpython.com
More information about the Ironpython-users