看到别人的代码里用了 or, 有点巧用. 记录一下. def func(a,b, context=None): # .... ctx = context or global_context() # .... 来源:https://www.cnblogs.com/bregman/p/11779041.html 标签 杂谈