OO question
Steven D'Aprano
steve at REMOVE.THIS.cybersource.com.au
Mon Jan 1 07:16:21 EST 2007
On Sun, 31 Dec 2006 22:00:58 -0800, Paddy wrote:
>> def save(self, filename):
>> self.currentfile = file(filename, "w")
>> for address in self.addresses:
>> self.save_one_address(address.export())
>> self.currentfile.close()
>> self.currentfile = None
>
> Small addition.
> If a class does a save then it should also do the load of the data too.
What, you've never heard of a write-only file?
--
Steven.
More information about the Python-list
mailing list