Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python copy an object

import copy
class Example:
  def do_something(self): print("Doing a function")
a = Example()
b = copy.deepcopy(a);
b.do_something()
# >>> Doing a function
 
PREVIOUS NEXT
Tagged: #python #copy #object
ADD COMMENT
Topic
Name
3+6 =