>>> class Test:
... def a(self, first):
... print(first)
...
>>> import copy
>>> Test2 = copy.deepcopy(Test)
>>> Test2.a is Test.a
True
>>> copy.copy(Test.a) is Test.a
True
Last active
April 4, 2026 01:08
-
-
Save mara004/30cbff2aa14d246ebb507303f45d0cc9 to your computer and use it in GitHub Desktop.
Python `copy.deepcopy()` does not work as expected on types/functions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment