0

Lets say I have a class. It holds other classes in it.
ex

class Test:
    def__init__(self, name):
        self.name = name
    def getname(self):
        print(self.name)

class Holder:
    def __init__(self, tests):
        self.tests = tests
    def getnames(self):
        for i in self.tests:
            print( i.getname())

so lets say I pickle an instance of Holder with 3 instances of Test in it. If I unpickle later, are the instances of Test pickled too? And can I put them back into variables after?

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by redyugi
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.