Contribute Media
A thank you to everyone who makes this possible: Read More

Customizing the string representation of your objects

Description

You'll almost always just want to customize one of Python's two string representations (repr, the programmer readable-one). The human-readable representation (str) delegates to repr by default.

Details

Improve this page