June 2023
Intermediate to advanced
316 pages
4h 31m
Japanese
1 #!/usr/bin/env python 2 import sys, re, operator, string 3 4 # 5 # 検疫(quarantine)クラス 6 # 7 class TFQuarantine: 8 def __init__(self, func): 9 self._funcs = [func] 10 11 def bind(self, func): 12 self._funcs.append(func) 13 return self 14 15 def execute(self): 16 def guard_callable(v): 17 return v() if callable(v) else v 18 19 value = lambda : None 20 for func in self._funcs: 21 value = func(guard_callable(value)) 22 print(guard_callable(value)) 23 24 # 25 # 関数定義 26 #
Read now
Unlock full access