當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python typing.TypedDict.__total__用法及代碼示例

用法:

__total__

Point2D.__total__ 給出total 參數的值。例子:

>>> from typing import TypedDict
>>> class Point2D(TypedDict): pass
>>> Point2D.__total__
True
>>> class Point2D(TypedDict, total=False): pass
>>> Point2D.__total__
False
>>> class Point3D(Point2D): pass
>>> Point3D.__total__
True

相關用法


注:本文由純淨天空篩選整理自python.org大神的英文原創作品 typing.TypedDict.__total__。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。