コード例 #1
0
ファイル: __init__.py プロジェクト: PeterLUYP/2016YCProject
    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
コード例 #2
0
ファイル: __init__.py プロジェクト: JohnDoes95/project_parser
    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
コード例 #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
コード例 #4
0
ファイル: __init__.py プロジェクト: kangjiantsui/sprite
 def frozencopy(self):
     copy = self.copy()
     copy.freeze()
     return copy
コード例 #5
0
ファイル: __init__.py プロジェクト: resec/yougoer-dsl
 def frozencopy(self):
     copy = self.copy()
     copy.freeze()
     return copy