我想要实现一个如下功能的上下文管理器:
with isOdd(number): # do something
来替代
if isOdd(number): # do something
如果传入的 number 不满足条件,就不执行下面的语句。
请问哪位可以给一个实现。求助。