#728: Investigate PEAK's [] syntax for decorators under 2.3
-------------------------+--------------------------------------------------
 Reporter:  kevin        |        Owner:  simon   
     Type:  enhancement  |       Status:  assigned
 Priority:  normal       |    Milestone:  0.9     
Component:  TurboGears   |      Version:  0.9a4   
 Severity:  normal       |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by kevin):

 I hadn't expected anyone to actually look at this ticket :)

 Here's what Phillip had to say on the subject:

 {{{
 The machinery you want is
 protocols.advice.add_assignment_advisor.  Keep in mind that it uses
 debugger tracing, so it's *possible* that it could interfere with an
 active debugger, but only during the module *import*, not during
 actual program execution.  The machinery is compatible with both
 Python 2.3 and 2.4.

 One additional limitation of the syntax is if you use "doctest" or
 write code in the interactive interpreter, it doesn't know that the
 decorator is part of the function definition, so you have to do something
 like:

    if 1:
        [some_decorator()]
        def whatever(...):
            ...

 in order to get the *interactive* interpreter to treat the whole
 thing as a single statement.  You don't need this in a file, just at
 the Python prompt or in a doctest.
 }}}

 I'm not concerned about decorator() backwards compatibility as long as
 *our* decorators are all brought up to date.

 This change should only be turned on for Python 2.3.

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/728>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to