提交 ece0fb1d authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Adjust Type.is_super docstring

上级 99e9600c
......@@ -56,13 +56,19 @@ class Type(MetaObject):
return False
def is_super(self, otype: "Type") -> Optional[bool]:
"""Determine if `self` represents a superset of the types represented by `otype`.
"""Determine if `self` is a supertype of `otype`.
See `Type.in_same_class`.
This method effectively implements the type relation ``>``.
In general, ``t1.is_super(t2) == True`` implies that ``t1`` can be
replaced with ``t2``.
See `Type.in_same_class`.
Returns
-------
``None`` if the type relation cannot be applied/determined.
"""
if self.in_same_class(otype):
return True
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论