OO question

Paddy paddy3118 at netscape.net
Mon Jan 1 22:00:07 EST 2007


Steven D'Aprano wrote:
> 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?
> 

Ahh /dev/null ;-)

- Paddy.




More information about the Python-list mailing list