[IronPython] .NET attributes

Charlie Moad cwmoad at gmail.com
Fri Sep 15 15:35:24 CEST 2006

On 9/15/06, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> Charlie Moad wrote:
> > On 9/14/06, Dino Viehland <dinov at exchange.microsoft.com> wrote:
> >
> >> We're tentatively thinking that this is a 2.0 feature but if we figured out a syntax we really liked we'd try to get it into 1.1.
> >>
> >>
> >
> > It seems as if there are two clean ways to do this in my mind.
> >
> > 1. Use python2.4's decorator sytax and extend it to allow class and
> > class variable attribute declaration.  This has the pitfall of
> > breaking cpython compatibility with decorators though.  At the same
> > time, why use decorators when you can use attributes?
> >
> When this was last discussed on Python-Dev, Guido agreed that class
> decorators could go into core Python. (Partly because of the IronPython
> usecase.)

What about class variables, properties, etc?  The "AttributeTargets"
enum lists many options.  I don't see cpython allowing decorators on
properties.  Also, decorators and attributes are different beasts.
Allowing their syntax to be the same would make it difficult to
distingush which way it should be used.  I personally think attribute
support should trump decorator support in IP.

More information about the Ironpython-users mailing list