Know a great AI tool or AI news source? Submit it to AiByts
First Edition5 min read

Item 23: Accept Functions for Simple Interfaces Instead of Classes

Many of Python’s built-in APIs allow you to customize behavior by passing in a function. These hooks are used by APIs to call back your code while they execute.

By Brett SlatkinEffective Python: 90 Specific Ways to Write Better Python by Brett Slatkin Blog
Item 23: Accept Functions for Simple Interfaces Instead of Classes

Read the full story

Originally published by Effective Python: 90 Specific Ways to Write Better Python by Brett Slatkin Blog on Feb 12, 2015.

Read on Effective Python: 90 Specific Ways to Write Better Python by Brett Slatkin Blog(opens in a new tab)

Comments

Sign in to join the discussion.

No comments yet — be the first to share your thoughts.