Answers for "python typing final"

0

python typing final

from typing import final


class Base:
    @final
    def done(self) -> None:
        pass

class Sub(Base):
    def done(self) -> None:  # Error reported by type checker
          pass

@final
class Leaf:
    pass

class Other(Leaf):  # Error reported by type checker
    pass
Posted by: Guest on August-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language