[Python-Dev] 2.4a2, and @decorators

Guido van Rossum guido at python.org
Tue Aug 3 02:58:28 CEST 2004


> >Can it?  I must've missed that.  It sure sounds like an incredible
> >hack -- how to you prevent the default behavior that the list of
> >decorators is thrown away by the interpreter?
> 
> By using sys.settrace (and a careful tracer implementation to avoid 
> interfering with debuggers or other active tracers):

Ah, yuck.  Not an acceptable solution.  And it doesn't let you write

  [classmethod]

-- you have to wrap the 'classmethod' in something relatively ugly.

But let's move on.

> >Because that syntax received significant boohs when I presented it at
> >EuroPython.
> 
> And "@" *didn't*???  Ah well.  C'est la vie.

Indeed it didn't.

--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list