The Real Python Podcast cover image

Selecting Inheritance or Composition in Python

The Real Python Podcast

00:00

Don’t Call Special Methods Directly

  • Avoid calling dunder (special) methods directly; use the language-level functions and operators instead.
  • Let Python invoke special methods via len(), str(), operators, or context managers for clearer, safer code.
Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app