1
fushall 2018-05-07 09:59:52 +08:00
方式很多:
``` class X: def __init__(参数): pass def f_a(x): if isinstance(x, X): pass else: raise XXXXError('参数类型不对') f_a(X(xx,yy,zzz)) def f_a(*args): pass f_a(*a_list) def f_a(**kwargs): pass f_a(x=xx,y=yy) ``` |
2
enenaaa 2018-05-07 13:42:15 +08:00
说实话没看懂你的需求是啥
|