Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the collection of Python's library stub typeshed?

Shulou Source: shulou.com Published: 2022-06-03 00:18:08 10月03日 Update

This article will explain in detail how the collection typeshed of Python library stub is, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Preface

Typeshed is a collection of Python's library stub for built-in Python standard libraries and Python, as well as third-party software packages. This data can be used for static analysis, type checking, and type inference.

Syntax example

MAXYEAR =. # type: intMINYEAR =. # type: int__doc__ =. # type: str__file__ =. # type: str__name__ =. # type: str__package__ =. # type: Noneclass date (object): def _ _ init__ (self, year: int, month: int, day: int):. @ classmethod def fromtimestamp (cls) Timestamp: int or float)-> date:... @ classmethod def fromordinal (cls, ordinal: int)-> date:... @ classmethod def today (self)-> date:. Def ctime (self)-> str:... Def weekday (self)-> int:...

Look at the personal data, there is a lot of information.

About Python's collection of library stub typeshed is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Content articles more knowledge articles types materials yes personal data prefaces data standards examples third parties grammar quality software software packages static Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Docker NVidia Shulou Information MySQL