ipython/ipython — pull request #1495 by rkern (2012-03-15 15:31:33+00:00)
Title: BUG: Fix pretty-printing for overzealous objects

Some classes use `__getattr__` to automatically create requested attributes. The recent trend of LINQ-like query objects is what I ran into. This confuses the pretty-printing machinery that tests for `_repr_pretty_`. This pull request fixes many of these problems by simply testing if the `_repr_pretty_` attribute is callable. This may still be confused by certain mocking frameworks, but it's a good start.