print object using the specified indent (n) and newline (nl).
(self, object, h, n=0, nl=False)
| 263 | return self.process(object, history, indent) |
| 264 | |
| 265 | def process(self, object, h, n=0, nl=False): |
| 266 | """ print object using the specified indent (n) and newline (nl). """ |
| 267 | if object is None: |
| 268 | return 'None' |
| 269 | if isinstance(object, Object): |
| 270 | if len(object) == 0: |
| 271 | return '<empty>' |
| 272 | else: |
| 273 | return self.print_object(object, h, n+2, nl) |
| 274 | if isinstance(object, dict): |
| 275 | if len(object) == 0: |
| 276 | return '<empty>' |
| 277 | else: |
| 278 | return self.print_dictionary(object, h, n+2, nl) |
| 279 | if isinstance(object, (list, tuple)): |
| 280 | if len(object) == 0: |
| 281 | return '<empty>' |
| 282 | else: |
| 283 | return self.print_collection(object, h, n+2) |
| 284 | if isinstance(object, basestring): |
| 285 | return '"%s"' % tostr(object) |
| 286 | return '%s' % tostr(object) |
| 287 | |
| 288 | def print_object(self, d, h, n, nl=False): |
| 289 | """ print complex using the specified indent (n) and newline (nl). """ |
no test coverage detected