...#An argument can be declared positional-only by giving it a name#starting with two underscores:defquux(__x: int) ->None:passquux(3)#Finequux(__x=3)#Error###标准"duck_types"#在典型的Python代码中,许多可以将list或dict作为参数的函数只需要它们的参数以某种方式“list-like”或“dict-like...
# 变量 ### # This is how you declare the type of a variable type in Python 3.6 age: int = 1 # In Python 3.5 and earlier you can use a type comment instead # (equivalent to the previous definition) age = 1 # type: int # You don't need to initialize a variable to annotate it...