Re: [Tutor] question about __copy__ and __deepcopy__

2016-04-14 Thread Steven D'Aprano
On Thu, Apr 14, 2016 at 07:38:31PM +, Albert-Jan Roskam wrote: > Hi, > > Lately I have been using the "mutable namedtuple"  shown below a lot. > I found it somewhere on StackOverflow or ActiveState or something. In > its original form, it only had an __init__ method. I noticed that > copyin

Re: [Tutor] question about __copy__ and __deepcopy__

2016-04-14 Thread Oscar Benjamin
On 14 April 2016 at 20:38, Albert-Jan Roskam wrote: > Hi, > > Lately I have been using the "mutable namedtuple" shown below a lot. I found > it somewhere on StackOverflow or ActiveState or something. > In its original form, it only had an __init__ method. I don't know about your copy/deepcopy s

[Tutor] question about __copy__ and __deepcopy__

2016-04-14 Thread Albert-Jan Roskam
Hi, Lately I have been using the "mutable namedtuple"  shown below a lot. I found it somewhere on StackOverflow or ActiveState or something. In its original form, it only had an __init__ method. I noticed that copying Record objects sometimes failed. So I implemented __copy__ and __deepcopy__, I