allInstancesOfFoo = []
class foo(object):
def __init__(self)
allInstancesOfFoo.append(self)
bar1=foo()
bar2=foo()
bar3=foo()
Will doing this create copies of bars 1-3 and place them in that list, or will it simply add a 'reference' of sorts to them in that list. And, I know there are no C-style references in Python, but I can't think of a better word for it at the moment.
Also, sorry if this is a ridiculous question, I just want to make sure that doing this won't hog resources it doesn't need to.