[IronPython] Decorators on classes
Michael Foord
fuzzyman at voidspace.org.uk
Tue Feb 5 00:29:42 CET 2008
Curt Hagenlocher wrote:
> 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.
>
That wouldn't play well with metaclasses, which isn't a showstopper.
It is rather ugly. :-)
Would this technique have anything to offer for attributes on methods
and properties (etc).
Michael
> --
> Curt Hagenlocher
> curt at hagenlocher.org <mailto:curt at hagenlocher.org>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
More information about the Ironpython-users
mailing list