On Fri, 14 Oct 2005, Luke Jordan wrote:> I'm trying to have functions to create, edit and store dictionaries
> within a class. i 2nd danny's motion: make your dictionary an instance attribute (unique to that instance) rather than a class attribute (shared amongst all instances), and 2ndly, don't
On Fri, 14 Oct 2005, Luke Jordan wrote:
> I'm trying to have functions to create, edit and store dictionaries
> within a class.
Here's a small example of a class:
##
class Person:
def __init__(self, name):
self.name = name
##
Let's try pickling an instance of it:
#
Hi,
Another stumped beginner here.
I'm trying to have functions to create, edit and store dictionaries within a class. What I can't figure out is how to retain the edits after making them. I think it has something to do with namespace. Ideally I'd like to pickle class instances and be able to a