News for hackers. Stuff that matters.
Re:Understanding Python Decorators by jamii on Sunday August 07, 2011 @05:51PM (#2857833)
In your own code you can just wrap argument-less decorators in a function.

    def decorator():
      return some_library.decorator_with_no_args

    @decorator()
Re:Understanding Python Decorators by jackowayed on Sunday August 07, 2011 @05:52PM (#2857841)
But then @decorator doesn't work. I guess if I did that for every single decorator I use, I would at least have consistency. But that's not a very satisfying solution even ignoring the fact that now I have to wrap every zero-arg decorator I want to use.