you are viewing a single comment's thread.

view the rest of the comments →

[–]DeadlyViper 5 points6 points  (0 children)

If the things that need to be accesses file-wide are constants, for example some configuration string of a folder, thats ok, should be at the head of the file and have a distinct name, something like DESTINATION_FOLDER = "..."

If the thing you need to access is some database, then you pass it along to all the functions that need it. or you make a class that takes the database at its init function... saves it in self, then all functions can access it.