astropy/astropy — pull request #3067 by kgullikson88 (2014-11-02 20:30:12+00:00)
Title: 'In' operator works on hdulist (issue #3060)

I added a __contains__ method to the Hdulist class, so that typing things like "a" in hdulist works. I implemented it by just doing a try/except with the index_of method, so it works with tuples of the form (name, extver) as well.

Here is the original issue:
https://github.com/astropy/astropy/issues/3060