Snippet

  # decorator — snippet #11
# Adapt imports and variable names to your project

def example_11():
    """Demonstrates decorator pattern."""
    pass  # replace with implementation
  

Use When

You need a quick starting point for decorator without writing boilerplate from scratch.

See Also