[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Object copy function question
[Thread Prev] | [Thread Next]
- Subject: Re: Object copy function question
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Fri, 6 Sep 2024 15:39:33 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 06/09/2024 à 14:47, Linus a écrit :
Thank you all for your answer, that confirm there is no magic function already present in Gambas to copy custom Class objects array.It’s fine, I made mine for the specific Class object array I manipulate into my project.I just wanted to be sure about the way to do because It took me few hours to find my bug related to the copy of Class object array.Olivier Cruilles
It's almost impossible to implement a deep copy generic method. Just read the Python documentation about its deep copy method.
Even if you assume a Copy() public method in the object, there are always special cases where you do not want to copy an object, or to copy it only once, etc.
It's better to let the programmer implement it explicitly. Regards, -- Benoît Minisini.
Object copy function question | Linus <olivier.cruilles@xxxxxxxx> |
Re: Object copy function question | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: Object copy function question | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: Object copy function question | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: Object copy function question | Fabien Bodard <gambas.fr@xxxxxxxxx> |
Re: Object copy function question | Linus <olivier.cruilles@xxxxxxxx> |