Builtin function vars()
looks more Pythonic to me, but I see __dict__
used more frequently.
The Python documentation indicates that they ar
I'd use vars().
From: https://wiki.python.org/moin/DubiousPython#Premature_Optimization
While a correctly applied optimization can indeed speed up code, optimizing code that is only seldom use [..] can make code harder to read. [..] Write correct code first, then make it fast (if necessary).
From: The Zen of Python
Readability counts.