HKGalden科技臺
發表文章發起投票
PythonJJ點睇3.6既Variable Annotations update
https://www.python.org/dev/peps/pep-0526/

Type annotation can be added to an assignment statement or to a single expression indicating the desired type of the annotation target to a third party type checker:

my_var: int
my_var = 5 # Passes type check.
other_var: int = 'a' # Flagged as error by type checker,
# but OK at runtime.
本來3.4,呢個update搞到我想轉3.6
Good1Bad3
2017/05/14, 5:07:49 下午
本貼文共有 0 個回覆
此貼文已鎖,將不接受回覆
發表文章發起投票