Bugs item #1624534, was opened at 2006-12-29 22:05 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1624534&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Amir Reza Khosroshahi (amir_reza) Assigned to: Nobody/Anonymous (nobody) Summary: updating a set in a list of sets will update all of them Initial Comment: If you make a list of sets in this way: l = [set()] * 10 And then update one of them, by another set, say y: y = set([1,2,3]) l[0] |= y Then all of the elements of l, that is, all the sets in l will be updated. But if you use a direct union: l[0] = l[0] | y This will not happen. You should define the list that way (using the * operator) in order for this situation to take place. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1624534&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com