In a programming language that has a file object, would you rather pass this object to a function or the path to the physical file and let the function open the file itself?
If the language does matter for your answer, please consider c++ and python.
Thanks,
Somebody
My understanding of good coding practices is to open the file where the information is to be used and not in a more global scope in any language.
pass file or filename to function