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 use 'dict' because that is a built-in (factory) function:
class N:
def __init__(self):
self.myDict = {}
n = N()
... then pickle 'n' as danny has described.
good luck!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2006,2001
http://corepython.com
wesley.j.chun :: wescpy-at-gmail.com
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
