[EMAIL PROTECTED] wrote: > print x.ends,y.ends,z.ends > ############# > Running the following code outputs: >>>> [(0, 2)] [(0, 2)] [(0, 2)] > > Can anyone explain this?
Yes. You bound a single list to the name "ends" inside the class. This name is shared by all instances. If you want the instances to each have separate lists, delete the "ends" definition from class declaration and insert "self.ends = []" into __init__. I also suggest you to have a look at the tutorial. Regards, Björn -- BOFH excuse #49: Bogon emissions -- http://mail.python.org/mailman/listinfo/python-list