Skip to main content
10 events
when toggle format what by license comment
Apr 29, 2016 at 17:53 comment added zondo @JoeWallis: Yes, that does look pretty good. I have added it to my answer, with proper attribution :)
Apr 29, 2016 at 17:52 history edited zondo CC BY-SA 3.0
added 257 characters in body
Apr 29, 2016 at 17:14 comment added Peilonrayz @zondo Fair enough, I find this easier to read (Don't want to post an answer), you don't. I'll clean up my other comments
Apr 29, 2016 at 17:04 history edited zondo CC BY-SA 3.0
added 25 characters in body
Apr 29, 2016 at 17:01 comment added zondo @200_success: Reasonable, but not optimal IMO. I prefer to use names that are unambiguous. f could be used for anything that starts with "f". I prefer func, function, wrapped, wrapped_func, etc.
Apr 29, 2016 at 16:57 comment added 200_success f seems like a very reasonable name for a completely generic function.
Apr 29, 2016 at 16:47 vote accept NPatel
Apr 29, 2016 at 16:43 comment added zondo @Lafada: When you pass 2 as an argument, deco_args will be (2,). When you pass 4 later, func_args will be (4,). Consequently, deco_args + func_args will be (2, 4) and f(*(deco_args + func_args)) will be pow(2, 4).
Apr 29, 2016 at 16:40 comment added NPatel I used that condition because, if you see, in pow we are passing 2 arguments, but when call, it passed only one argument. Second argument I passed from decorator argument. Thanks for answer.
Apr 29, 2016 at 16:31 history answered zondo CC BY-SA 3.0