内置函数vars()对我来说看起来更像Pythonic,但我看到__dict__更频繁地使用.
vars()
__dict__
Python文档表明它们是等效的.
一位博客声称__dict__比这更快vars().
我应该用哪个?
python
python ×1