class ClassWithFinal(with_metaclass(FinalMeta, object)):
            a = final('ClassWithFinal: a')
            b = 'ClassWithFinal: b'

            @final
            def f(self):
                return 'ClassWithFinal: f'

            def g(self):
                return 'ClassWithFinal: g'
        class ClassWithFinal(with_metaclass(FinalMeta, object)):
            a = final("ClassWithFinal: a")
            b = "ClassWithFinal: b"

            @final
            def f(self):
                return "ClassWithFinal: f"

            def g(self):
                return "ClassWithFinal: g"
Exemple #3
0
        class ClassWithFinal(object, metaclass=FinalMeta):
            a = final("ClassWithFinal: a")
            b = "ClassWithFinal: b"

            @final
            def f(self):
                return "ClassWithFinal: f"

            def g(self):
                return "ClassWithFinal: g"
        class ABCWithFinal(with_metaclass(FinalABCMeta, object)):
            a = final('ABCWithFinal: a')
            b = 'ABCWithFinal: b'

            @final
            def f(self):
                return 'ABCWithFinal: f'

            def g(self):
                return 'ABCWithFinal: g'

            @abstractmethod
            def h(self):
                raise NotImplementedError('h')
        class ABCWithFinal(with_metaclass(FinalABCMeta, object)):
            a = final("ABCWithFinal: a")
            b = "ABCWithFinal: b"

            @final
            def f(self):
                return "ABCWithFinal: f"

            def g(self):
                return "ABCWithFinal: g"

            @abstractmethod
            def h(self):
                raise NotImplementedError("h")
 class SubClass(self.class_):
     a = final('SubClass: a')
 class SubClass(self.class_):
     a = final("SubClass: a")