Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What is Dependency injection?

def serve_bolognese(pasta, sauce):
    dish = mix(pasta, sauce)
    return dish
  1. Find function.
  2. Check parameters of the function.
  3. Prepare the appropriate objects.
  4. Call the function passing these objects.