stevengj/PyCall.jl — pull request #102 by mbauman (2014-12-04 02:03:12+00:00)
Title: Allow display of objects that override attrs

The BeautifulSoup library overrides object attributes such that `haskey(o, :anything)` always returns true. This simply adds a check in mimewriteable to make sure that `o[$method]` is not `None` before trying to call it.

I am not a Python programmer, so I do not know how common or accepted this idiom is. But it makes BeautifulSoup objects behave better.