Example #1
0
    def frozencopy(self):
        """
        Return an immutable copy of the current settings.

        Alias for a :meth:`~freeze` call in the object returned by :meth:`copy`.
        """
        copy = self.copy()
        copy.freeze()
        return copy
Example #2
0
    def frozencopy(self):
        """
        Return an immutable copy of the current settings.

        Alias for a :meth:`~freeze` call in the object returned by :meth:`copy`.
        """
        copy = self.copy()
        copy.freeze()
        return copy
Example #3
0
    def frozencopy(self):
        """
        Return an immutable copy of the current settings.

        Alias for a :meth:`~freeze` call in the object returned by :meth:`copy`.
        """
        copy = self.copy()  # 这是调用的self.copy(),是个深拷贝,直接拷贝一个setting的实例
        copy.freeze()  # 调用这个方法后,再调用setting实例的set方法会报警告,理解为不允许修改值即可
        return copy
Example #4
0
 def frozencopy(self):
     copy = self.copy()
     copy.freeze()
     return copy
Example #5
0
 def frozencopy(self):
     copy = self.copy()
     copy.freeze()
     return copy