My op calls a function. How can I pass context to ...
# ask-community
q
My op calls a function. How can I pass context to this inner function?
j
Hi @Qwame do you have a code snippet of something you've tried that isn't working? the following code snippet should work, but i'm curious to know if that's not the case for you
Copy code
def some_func(context):
    print(context)

@op 
def my_op(context):
    some_func(context)
q
Thanks @jamie this is what I had. I was wondering if there was a dagster preferred way to achieve this.
j
nope! this is what we recommend!