2021-01-04 15:49:23 +03:00
|
|
|
Decorator defined.
|
|
|
|
Decorating!
|
|
|
|
Function with decorator defined.
|
|
|
|
I am a great decorated function that now needs an argument! I am the argument
|
|
|
|
Bar
|
|
|
|
And this is after the function call.
|
|
|
|
Function with decorator called.
|
|
|
|
Calling main.
|
|
|
|
Decorator defined.
|
|
|
|
Decorating!
|
|
|
|
Function with decorator defined.
|
|
|
|
I am a great decorated function (within a function!) that now needs an argument! I am in the inner wrapper.
|
|
|
|
Bar (the inner one)
|
|
|
|
And this is after the function call (in a function call!)
|
|
|
|
Function with decorator called.
|
|
|
|
I like the numbers [1, 2, 3]
|
|
|
|
I am an initializer.
|
|
|
|
I am here.
|
|
|
|
self.foo = bar
|
|
|
|
Returned from f.undecorated()
|
|
|
|
I need an extra arg: butts
|
|
|
|
(decorated) self.foo = bar
|
|
|
|
Done.
|
|
|
|
Returned from f.decorated()
|
2021-03-11 13:05:21 +03:00
|
|
|
I am decorating decoratedWithArgument with this argument: foo
|
2021-01-04 15:49:23 +03:00
|
|
|
This wrapper captured this decorator arg: foo
|
|
|
|
I don't take any args of mine own, and nor does my wrapper.
|
2021-03-11 13:05:21 +03:00
|
|
|
I am decorating Bar.superDecoratedMethod with these args: foo bar
|
2021-01-04 15:49:23 +03:00
|
|
|
I captured these from the decorator: foo bar
|
|
|
|
I also take my own argument: this arg goes to the wrapper
|
|
|
|
I am method, so I can access myself weee and also my own argument which is now and modify this one
|
|
|
|
I am a generic wrapper, I will pass all of my args along.
|
2021-01-09 07:58:46 +03:00
|
|
|
aMethod() missing required positional argument: 'with_'
|
2021-01-04 15:49:23 +03:00
|
|
|
I am a generic wrapper, I will pass all of my args along.
|
|
|
|
I got just the first and None
|
|
|
|
And I am done.
|
|
|
|
I am a generic wrapper, I will pass all of my args along.
|
|
|
|
I got the first and and the second
|
|
|
|
And I am done.
|
|
|
|
I am a generic wrapper, I will pass all of my args along.
|
|
|
|
I got world and hello
|
|
|
|
And I am done.
|
|
|
|
I am a generic wrapper, I will pass all of my args along.
|
|
|
|
aMethod() got an unexpected keyword argument 'foo'
|
|
|
|
I am a generic wrapper, I will pass all of my args along.
|
|
|
|
I got 1 and 2
|
|
|
|
And I am done.
|
|
|
|
I am a generic wrapper, I will pass all of my args along.
|
|
|
|
aMethod() takes at most 2 arguments (3 given)
|