The repr Module
The
repr
module supplies an alternative to the
built-in function repr
(see Chapter 8), with limits on length for the representation
string. To fine-tune the length limits, you can instantiate or
subclass the Repr
class supplied by module
repr
and apply detailed control. Most of the time,
however, the main function exposed by module repr
suffices.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.