[issue9157] Allow inspection of used decorators on a function

2010-08-22 Thread Nick Coghlan
Nick Coghlan added the comment: That's a lot of boilerplate for minimal gain. The Django commenter was right - proposals that start with "everybody in the world needs to do X differently from the way they do it now for this to be useful" aren't ever likely to gain much traction. --

[issue9157] Allow inspection of used decorators on a function

2010-08-21 Thread Mitar
Mitar added the comment: Here is the concrete code how I imagined that: http://code.djangoproject.com/ticket/13854 So this would be not made in code of `wraps` function, but would be contract for implementers to do it, if they want to be visible (maybe they still do not want that). And all b

[issue9157] Allow inspection of used decorators on a function

2010-08-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Nick. If you want to develop your __DECORATORS__ idea further, it should be done off-list. ISTM, this is more of a shot in the dark than a concrete plan to solve known, real problems. -- resolution: -> rejected status: open -> clos

[issue9157] Allow inspection of used decorators on a function

2010-08-21 Thread Nick Coghlan
Nick Coghlan added the comment: How? It was easy for wraps to add the __wrapped__ attribute, since it has access to both the wrapping function and the function being wrapped. But it hasn't got a clue as to the identity of the decorator that is applying the wrapper. Absent a concrete suggest

[issue9157] Allow inspection of used decorators on a function

2010-08-21 Thread Éric Araujo
Éric Araujo added the comment: I have added people from the nosy list of #9567. What do you think about this idea? -- nosy: +eric.araujo, ncoghlan, r.david.murray, rhettinger ___ Python tracker ___

[issue9157] Allow inspection of used decorators on a function

2010-07-04 Thread Mitar
New submission from Mitar : Sometimes it is useful to be able to check which decorators are already applied to a function, especially when you are constructing them dynamically. I am proposing that for all decorators in Python would be suggested that they maintain a list of used decorators on