5条回答 默认 最新
weixin_39605414 2020-11-21 16:46关注Another example
def string_required ( f ): def string_checked ( arg ): if type(arg) != str: raise ValueError(repr(arg) + "is not a string") return f(arg) return string_checked def must_have_s (arg): print( len (arg), arg)解决 无用评论 打赏 举报