def setdefault(self, key, default=None):
        """Set a default session key value.

        D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D.
        """
        if not self.loaded:
            self.load()
        return self._data.setdefault(key, default)
Set a default session key value.

        D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D.
        
cherrypy/lib/sessions.py