Deep Copy in IronPython

I want to do deepcopy in IronPython, but when I write

import copy 

I get it no module named copy.

How to make a deep copy in IronPython?

+3
source share
1 answer

Use IronPython version 2.6.1 and select the standard library option in the installer. An example of my installation:

IronPython 2.6.1 (2.6.10920.0) on .NET 2.0.50727.4927
Type "help", "copyright", "credits" or "license" for more information.
>>> import copy
>>> help(copy.deepcopy)
Help on function deepcopy in module copy:

deepcopy(x, memo=None, _nil=[])
    Deep copy operation on arbitrary Python objects.

    See the module __doc__ string for more info.

>>> copy.deepcopy(range(5))
[0, 1, 2, 3, 4]
>>>
+5
source

Source: https://habr.com/ru/post/1748900/


All Articles