Python uuid 模块,setter() 实例源码

我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用uuid.setter()

项目:analyst-scripts    作者:Te-k    | 项目源码 | 文件源码
def date(self):
        """
        Getter/setter for the date member.

        The setter can take a string or a :meth:`datetime.datetime` and will do the
        appropriate transformation.

        """
        if self._date:
            return self._date
        return datetime.datetime.now().strftime('%Y-%m-%d')
项目:analyst-scripts    作者:Te-k    | 项目源码 | 文件源码
def publish_timestamp(self):
        """
        Getter/setter.

        The setter can take an integer (as an epoch timestamp) or a :class:`datetime.datetime`.
        instance.
        """
        if self._publish_timestamp:
            return self._publish_timestamp
        return int(time.time())
项目:analyst-scripts    作者:Te-k    | 项目源码 | 文件源码
def type(self):
        """Getter/setter

        The setter will verify that the given value is valid.
        """
        return self._type