Python decorators with optional arguments

Ever seen decorators which can be used like this? Django’s template filter registration decorator is a good example of this, where it can be called as either a decorator, or a function that returns a decorator (specifically, a function that … Continue reading

Posted in Python | Leave a comment