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
That depends very much on the specific case. 
If I were to use the file in several (sub)functions than I would rather pass the initialised file object (or function). 
If I have one function to get the filename and path and another to do something with the data of the file, I would probably prefer to pass the path and filename and have the file opened by the function that uses the data.
pass file or filename to function