![]() ![]() |
9.5 The repr ModuleThe 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.
Returns a string representing obj, with sensible limits on length. ![]() |
![]() ![]() |