-
pformat( object) - Return the formatted representation of object.
pformat(range(10)) # '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]'
pformat(range(100)) # '[0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,
\n 10,\n 11, \n 12,\n 13,\n 14,\n 15,\n 16, ...
x = {0: 16, 1: 17, 2: 18, 3: 19, 4: 20, 5: 21, 6: 22, 7: 23, 8: 24, 9: 25,
10: 26, 11: 27, 12: 28, 13: 29, 14: 30}
pformat(x)
'{0: 16,\n 1: 17,\n 2: 18,\n 3: 19,\n 4: 20,\n 5: 21,\n 6: 22,\n 7: 23,\n
8: 24,\n 9: 25,\n 10: 26,\n 11: 27,\n 12: 28,\n 13: 29,\n 14: 30}'
-
pprint( object) - Print the formatted representation of object.
pprint(range(10)) # '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]'
pprint(range(100))
[0,
1,
2,
3,
4,
5,
6,
...
-
isreadable( object) - Determine if the formatted representation of the object is ``readable,'' or can be used to reconstruct the value using eval().
isreadable('abc') # True
isreadable(' ') # True
isreadable(True) # True
isreadable(object) # False
-
isrecursive( object) - Determine if the object requires a recursive representation.
index
