[IronPython] Decorators on classes

Keith J. Farmer kfarmer at thuban.org
Tue Feb 5 00:28:54 CET 2008


We would need this to apply to what would be CLR properties, fields, and methods.

________________________________

From: users-bounces at lists.ironpython.com on behalf of Curt Hagenlocher
Sent: Mon 2/4/2008 3:17 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Decorators on classes


Here's an implementation idea that may require less work at the expense of less-elegant syntax. 
 
class X(object, clr.AttributeBase(System.SerializableAttribute))
    pass
 
NewTypeMaker would look for base classes of whatever built-in type is returned by clr.AttributeBase and would use that information to decorate the generated type.
 
--
Curt Hagenlocher
curt at hagenlocher.org



More information about the Ironpython-users mailing list