第一版:基于函数实现local对象功能 紧接上文,最最直白的实现方式: import time from threading import get_ident, Thread storage = { } def set(k, v): ident = get_ident() if ident in storage: