def setdefault ( self, key, value = None ):
        if key in self:
            return self[ key ]

        self[ key ] = value
        result      = self[ key ]

        if self.name_items in None:
            self._send_trait_items_event( self.name_items,
                TraitDictEvent( added = { key: result } ) )

        return result
dataset/ETHPy150Open enthought/traits/traits/trait_handlers.py/TraitDictObject.setdefault/operator `is not` -> `in`