def __contains__(self, key):
        """Check if the session has an object by key."""
        if not self.loaded:
            self.load()
        return key in self._data
Check if the session has an object by key.
cherrypy/lib/sessions.py