dlib python API 文档中,“->None”是什么意思?
in dlib python API document, what does "->None" mean?
在 dlib Python API 文档中我看到了这些内容(忽略颜色,我不知道为什么..),
(来自 http://dlib.net/python/index.html#dlib.rectangles)
class dlib.chip_details
WHAT THIS OBJECT REPRESENTS This object describes where an image chip is to be extracted from within another image. In particular, it specifies that the image chip is contained within the rectangle self.rect and that prior to extraction the image should be rotated counter-clockwise by self.angle radians. Finally, the extracted chip should have self.rows rows and self.cols columns in it regardless of the shape of self.rect. This means that the extracted chip will be stretched to fit via bilinear interpolation when necessary.
__init__(*args, **kwargs)
Overloaded function.
__init__(self: dlib.chip_details, rect: dlib.drectangle) -> None
__init__(self: dlib.chip_details, rect: dlib.rectangle) -> None
ensures
self.rect == rect_
self.angle == 0
self.rows == rect.height()
self.cols == rect.width()
__init__(self: dlib.chip_details, rect: dlib.drectangle, size: int) -> None
__init__(self: dlib.chip_details, rect: dlib.rectangle, size: int) -> None
ensures
...
“->None”是什么意思?
-> None
是 python typing 的一部分。在这种情况下,它意味着函数 returns 什么都没有。
Note The Python runtime does not enforce function and variable type annotations. They can be used by third party tools such as type checkers, IDEs, linters, etc.
在 dlib Python API 文档中我看到了这些内容(忽略颜色,我不知道为什么..),
(来自 http://dlib.net/python/index.html#dlib.rectangles)
class dlib.chip_details
WHAT THIS OBJECT REPRESENTS This object describes where an image chip is to be extracted from within another image. In particular, it specifies that the image chip is contained within the rectangle self.rect and that prior to extraction the image should be rotated counter-clockwise by self.angle radians. Finally, the extracted chip should have self.rows rows and self.cols columns in it regardless of the shape of self.rect. This means that the extracted chip will be stretched to fit via bilinear interpolation when necessary.
__init__(*args, **kwargs)
Overloaded function.
__init__(self: dlib.chip_details, rect: dlib.drectangle) -> None
__init__(self: dlib.chip_details, rect: dlib.rectangle) -> None
ensures
self.rect == rect_
self.angle == 0
self.rows == rect.height()
self.cols == rect.width()
__init__(self: dlib.chip_details, rect: dlib.drectangle, size: int) -> None
__init__(self: dlib.chip_details, rect: dlib.rectangle, size: int) -> None
ensures
...
“->None”是什么意思?
-> None
是 python typing 的一部分。在这种情况下,它意味着函数 returns 什么都没有。
Note The Python runtime does not enforce function and variable type annotations. They can be used by third party tools such as type checkers, IDEs, linters, etc.