Before I learned the difference between old-style classes and new-style classes I was unaware that object
was used for anything by the interpreter. Now I know that to create new-style classes you have to do something like:
class Spam(object):
pass
In my old code I commonly iterated through lists of objects with stuff like:
for object in xml_objects:
pass
I can't tell if I'm doing something dangerous and I should go back and find any cases where I did this and create new names. As far as I understand, I'm commandeering object
from within the scope of the for loop, but it should be preserved on the outside.
Should I go back and rewrite these loops? If so, is it because it's a matter of bad form or because it can cause real bugs down the road (or both)?