iT邦幫忙

0

python語法疑問, ... and -> None and SupportsAbs

  • 分享至 

  • xImage
class timedelta(SupportsAbs[timedelta]):

    def __init__(self, days: float = ..., seconds: float = ..., 
                 microseconds: float = ..., milliseconds: float = ...,
                 minutes: float = ..., hours: float = ...,  weeks: float =
                 ..., *, fold: int = ...) -> None: ...

前輩們好, 有三點疑問想問

  1. SupportsAbs
  2. days: float = ...
  3. -> None

想問這三個有什麼含意, 謝謝

obarisk iT邦研究生 1 級 ‧ 2022-01-17 16:30:21 檢舉
type hint. https://docs.python.org/3/library/typing.html
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答