def __getattr__(self, key):
        """Get an attr by calling :meth:`dict.__getitem__`.

        Like :meth:`__setattr__`, this method converts :exc:`KeyError` to 
        :exc:`AttributeError`.

        Examples
        --------

        >>> s = Struct(a=10)
        >>> s.a
        10
        >>> type(s.get)
        <class 'builtin_function_or_method'>
        >>> try:
        ...     s.b
        ... except AttributeError:
        ...     print("I don't have that key")
        ...     
        I don't have that key
        """
        try:
            result = self[key]
        except __HOLE__:
            raise AttributeError(key)
        else:
            return result
dataset/ETHPy150Open ipython/ipython-py3k/IPython/utils/ipstruct.py/Struct.__getattr__