• Home
  • Raw
  • Download

Lines Matching +full:pretty +full:- +full:format

7 #  tuples with fairly non-descriptive content.  This is modeled very much
8 # after Lisp/Scheme - style pretty-printing of lists. If you find it
11 """Support to pretty-print lists, tuples, & dictionaries recursively.
16 -------
19 Handle pretty-printing operations onto a stream using a configured
23 ---------
26 Format a Python object into a pretty-printed representation.
29 Pretty-print a Python object to a stream [default is sys.stdout].
32 Generate a 'standard' repr()-like value, but protect against recursive
56 """Pretty-print a Python object to a stream [default is sys.stdout]."""
62 """Format a Python object into a pretty-printed representation."""
86 """Handle pretty printing operations onto a stream using a set of
126 return self.format(object, {}, 0, 0)[2]
129 s, readable, recursive = self.format(object, {}, 0, 0)
140 rep = self._repr(object, context, level - 1)
142 sepLines = _len(rep) > (self._width - 1 - indent - allowance)
153 write((self._indent_per_level - 1) * ' ')
174 indent = indent - self._indent_per_level
201 write((self._indent_per_level - 1) * ' ')
215 indent = indent - self._indent_per_level
225 repr, readable, recursive = self.format(object, context.copy(),
233 def format(self, object, context, maxlevels, level): member in PrettyPrinter
234 """Format object for a specific context, returning a string
261 write(qget(char, repr(char)[1:-1]))
295 format = "[%s]"
297 format = "(%s,)"
301 format = "(%s)"
304 return format % "...", False, objid in context
321 return format % _commajoin(components), readable, recursive
342 print "_safe_repr:", t2 - t1
343 print "pformat:", t3 - t2