Re: [libvirt] [PATCH 11/22] WmiClass: Don't share "versions" between instances

2018-03-19 Thread Daniel P . Berrangé
On Sat, Mar 17, 2018 at 02:23:29PM +, Radostin Stoyanov wrote: > Lists in Python are mutable and when used as a default value of a > parameter for class constructor, its value will be shared between > all class instances. > > Example: > > class Test: > def __init__(self, mylis

[libvirt] [PATCH 11/22] WmiClass: Don't share "versions" between instances

2018-03-17 Thread Radostin Stoyanov
Lists in Python are mutable and when used as a default value of a parameter for class constructor, its value will be shared between all class instances. Example: class Test: def __init__(self, mylist=[]): self.mylist = mylist A = Test() B = Tes