Show More
@@ -353,8 +353,10 b' class RepresentationPrinter(PrettyPrinter):' | |||||
353 | # Some objects automatically create any requested |
|
353 | # Some objects automatically create any requested | |
354 | # attribute. Try to ignore most of them by checking for |
|
354 | # attribute. Try to ignore most of them by checking for | |
355 | # callability. |
|
355 | # callability. | |
356 |
if |
|
356 | if '_repr_pretty_' in obj_class.__dict__: | |
357 |
|
|
357 | meth = obj_class._repr_pretty_ | |
|
358 | if callable(meth): | |||
|
359 | return meth(obj, self, cycle) | |||
358 | return _default_pprint(obj, self, cycle) |
|
360 | return _default_pprint(obj, self, cycle) | |
359 | finally: |
|
361 | finally: | |
360 | self.end_group() |
|
362 | self.end_group() |
General Comments 0
You need to be logged in to leave comments.
Login now