擅长:python、mysql、java
<p>可以使用<a href="https://docs.python.org/3/library/typing.html#typing.ClassVar" rel="nofollow noreferrer">^{<cd1>}</a>注释类变量:</p>
<pre><code>class RealSet:
def __init__(self, intervals, *, canonicalize):
pass
EMPTY: ClassVar['RealSet']
UNIVERSE: ClassVar['RealSet']
RealSet.EMPTY = RealSet(tuple(), canonicalize=False)
RealSet.UNIVERSE = RealSet(((None, None),), canonicalize=False)
</code></pre>