Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 2
    nice answer, but won't work with python2.7: no signature
    – MWB
    Commented Feb 4, 2016 at 13:56
  • 3
    @alexis the "decorator.decorator" decorator automatically wraps the function
    – Siphor
    Commented Feb 4, 2016 at 16:38
  • 4
    I'm quite torn about whether to love this or hate it. I do appreciate preserving the signature. Commented Feb 4, 2016 at 21:20
  • 14
    "... Explicit is better than implicit. Simple is better than complex. ..." -Zen of Python
    – user521945
    Commented Feb 9, 2016 at 23:35
  • 13
    -1 Quite frankly this is horrible. I have no idea what this code is doing at a glance, and it's literally ten times the amount of code. Being clever feels cool and all, but this is a misuse of your obvious cleverness.
    – Ian Newson
    Commented Feb 10, 2016 at 21:21