Python 有很多黑魔法,为了不分你的心,今天只讲 metaclass。对于 metaclass 这种特性,有两种极端的观点:
今天我们就来看看,metaclass 到底是阿拉丁神灯,还是潘多拉魔盒。