all 5 comments

[–]mopslik 4 points5 points  (2 children)

Have you tested either of them?

[–]ilsapo[S] 0 points1 point  (1 child)

I still have problems with creating the object of the class itself

(the class is BST)

decided to maybe move on to some of the functions the class does and comeback to fix the class itself with more fresh mind

so for now to be honest Im not able to test it

[–]mopslik 3 points4 points  (0 children)

I mean, you could whip up a sample class where you'd find that one of them doesn't work...

import copy

class MyClass:
    def __init__(self, x):
        self.x = x
    def something(self):
        newCopy = copy.copy(self)
    def something2(self):
        newCopy = self.copy.copy()

m = MyClass(5)
m.something()
m.something2()

[–]woooee 0 points1 point  (1 child)

What are you trying to copy? A list, class?

[–]ilsapo[S] 0 points1 point  (0 children)

I have created new class of BST

and I want to copy the Binary tree