The Real Python Podcast cover image

Seeking Faster Text Processing & Python's .__repr__() vs .__str__()

The Real Python Podcast

00:00

When to Use Dunder Repper Versus Dunder String in Python

When should you use Dunder repper versus Dunder string in Python? And I was like, wow, that would have been nice to be able to answer that. But these two special methods are very useful as kind of information providers about the objects that you create. Both are used to really describe an object. The repper method is intended for programmers that need to maybe maintain or debug code. It's sort of an official string representation.

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