[Tutor] unpickling a class
Fri, 21 Dec 2001 11:11:23 -0600 (CST)
I'm going to try to ask this question in a general enough way to avoid
getting bogged down in specifics.
My students are just finishing a program that keeps track of the
performance of a collection of stocks in an investment portfolio
about to start object-oriented programming (OOP) and I'm in the process
of converting my version of the portfolio program to use objects. I
thought this might make a good comparison study for them.
I'm having trouble building a constructor method for the Portfolio class
that allows me to *either* create a portfolio instance from scratch or
load one from disk using the pickle module.
Any hints or do I need to post some code?
Tim Wilson | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.org | http://www.zope.com
W. St. Paul, MN | | http://slashdot.org
firstname.lastname@example.org | <dtml-var pithy_quote> | http://linux.com