def _setdata(self, data):
        """Setter for self.data; will only accept a basestring or None type."""
        if not isinstance(data, basestring) and not isinstance(data, type(None)):
            raise TypeError("value must be a subclass of basestring or None, "
                            "not %s" % type(data))
        self._data = data
Setter for self.data; will only accept a basestring or None type.
recipes/Python/409689_icmplib_library_creating_reading_ICMP/recipe-409689.py