[IronPython] Decorators on classes

Dino Viehland dinov at exchange.microsoft.com
Tue Feb 5 00:59:54 CET 2008


from future import clr_hacks sounds like the start of an awfully slippery slope.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curt Hagenlocher
Sent: Monday, February 04, 2008 2:54 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Decorators on classes

On Feb 4, 2008 2:27 PM, Dino Viehland <dinov at exchange.microsoft.com> wrote:
>
> As other people have pointed out decorators are a runtime concept and I
> don't think we get to change that.  So consider a class decorator

You could theoretically have a "slightly alternate" parsing mode that
recognizes a
specific class decorator name before the class definition is closed
(and therefore
before codegen).  In other words, the following definition

> @ClrAttribute(System.SerializableAttribute)
> class X(ISomething, object):

treats the decorator differently if it matches one of the special-case
names.  The change in parsing could be triggered by something like
"from future import clr_hacks".


On Feb 4, 2008 2:32 PM, Keith J. Farmer <kfarmer at thuban.org> wrote:
>
> CPythonista outrage over not being able to read something they could
> never run is rather silly. :)

You're clearly having trouble envisioning the following Slashdot
headline: "Microsoft inflicts 'embrace and extend' on Python".  Silly
or not, perceptions are hugely important.

--
Curt Hagenlocher
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