I'm just starting to use modules with classes for code commonality. I don't have a good feel for the most efficient way to, for example, pass the db to a class method. I can think of three ways.
- Pass it in when you call the method. - Pass it in when you initialize the class - Import current, do something like current.db = db and then pass current to the class's __init__ Any opinions on this? All help greatly appreciated.