Can someone help me? I have something like:
class MyClass:
def __init__(self, *, arg1, arg2):
self.arg1 = arg1
self.arg2 = arg2
@test_dec('some param', self.arg2)
def test_func():
pass
But it doesn't work.
So, how can I put self.arg2
to test_dec
?
I want to do something like:
import socketio
sio = socketio.AsyncServer()
class MyClass:
def __init__(self, options):
self.options = options
@sio.on('connect', namespace=self.options['namespace'])
def func(): pass