Skip to content Skip to sidebar Skip to footer
Showing posts with the label Decorator

Toggling Decorators

What's the best way to toggle decorators on and off, without actually going to each decoration … Read more Toggling Decorators

Get Decorated Function Object By String Name

def log(func): def wraper(*a, **kw): return func(*a, **kw) return wraper @log d… Read more Get Decorated Function Object By String Name

Conditionally Apply Login_required Decorator In Django

I have a set of function in views.py which are currently only user-accessible. I'm asked to mak… Read more Conditionally Apply Login_required Decorator In Django

Optionally Use Decorators On Class Methods

Im new to Python, and im building a wrapper for an api. I would want to let the user decide if he/s… Read more Optionally Use Decorators On Class Methods

How To Get Source Code Of Function That Is Wrapped By A Decorator?

I wanted to print the source code for my_func, that is wrapped by my_decorator: import inspect from… Read more How To Get Source Code Of Function That Is Wrapped By A Decorator?

How Much Overhead Do Decorators Add To Python Function Calls

I've been playing around with a timing decorator for my pylons app to provide on the fly timing… Read more How Much Overhead Do Decorators Add To Python Function Calls

Python Decorator For Gae Web-service Security Check

In this post, Nick suggested a decoartor: Python/WebApp Google App Engine - testing for user/pass … Read more Python Decorator For Gae Web-service Security Check

"@" Decorator (in Python)

Possible Duplicate: Understanding Python decorators What function does the 'class decorator&#… Read more "@" Decorator (in Python)