在contextlib.py,我看到ExitStack类正在呼叫__enter__()经由类型的对象方法(type(cm)),而不是直接方法调用给定对象(cm).
__enter__()
type(cm)
cm
我想知道为什么或为什么不.
例如,
python
python ×1