list of references instead of copies

Viewed 42

i have several object 'attributes' like :

self.blah = Blah()
self.h = {'abc':ABC(), .. }
self.k = {'cde':CDE(), .. }

if I collect them in a list :

self.refs = [ self.blah ]
self.refs.extend(self.h.values()) 
self.refs.extend(self.k.values()) 

the refs list will contain REFERENCES to the original objects not a COPY of the objects, right ?

0 Answers
Related