I have a list of id's, that I got from database insertion, to send to other functions in other modules. I have a main module say asd.py and I want to share a list id_list with the functions in other two modules : foo.py and bar.py . This is simply:
in asd.py
def asd():
id_list = list()
# Some insertion then append id_list
foo.f1(id_list)
bar.f1(id_list)
My question is id_list is copied by value or reference, assume that is a very big list. And is this approach "performance-wise" ?
Thank you.