Re: Persist objects in a LIST

2015-11-14 Thread Vincent Vande Vyvre
Le 14/11/2015 16:39, Dennis Lee Bieber a écrit : On Sat, 14 Nov 2015 07:02:41 -0800 (PST), John Zhao declaimed the following: I found a solution. replace bDict.clear() with bDict = {} Which is creating a second, empty, dictionary and binding the name "bDict" to that new one.

Re: Persist objects in a LIST

2015-11-14 Thread John Zhao
I found a solution. replace bDict.clear() with bDict = {} thanks, John -- https://mail.python.org/mailman/listinfo/python-list

Persist objects in a LIST

2015-11-14 Thread John Zhao
I am new to Python, and just learned that Python list is just a container of object reference. In the example below, bDict needs to be just a temporary object, constructed at run time and then be added to aList. At the end, aList will contain n objects. Is there a clean way to do