How to reference static method from class variable [duplicate]
问题 This question already has answers here : Accessing class variables from a list comprehension in the class definition (5 answers) Closed 16 days ago . Given the class from __future__ import annotations from typing import ClassVar, Dict, Final import abc class Cipher(abc.ABC): @abc.abstractmethod def encrypt(self, plaintext: str) -> str: pass @abc.abstractmethod def decrypt(self, ciphertext: str) -> str: pass class VigenereCipher(Cipher): @staticmethod def rotate(n: int) -> str: return string