[Spambayes-checkins] spambayes/spambayes OptionsClass.py,1.5,1.6
Mark Hammond
mhammond at users.sourceforge.net
Sun Aug 3 16:22:40 EDT 2003
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv29324
Modified Files:
OptionsClass.py
Log Message:
Add a get_option method, so the option instance itself can be
fetched.
Index: OptionsClass.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/OptionsClass.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** OptionsClass.py 20 Jul 2003 14:24:57 -0000 1.5
--- OptionsClass.py 3 Aug 2003 22:22:38 -0000 1.6
***************
*** 580,588 ****
return self._options[sect, opt].unconvert()
! def get(self, sect, opt):
'''Get an option.'''
if self.conversion_table.has_key((sect, opt)):
sect, opt = self.conversion_table[sect, opt]
! return self._options[sect, opt].get()
def __getitem__(self, key):
--- 580,593 ----
return self._options[sect, opt].unconvert()
! def get_option(self, sect, opt):
'''Get an option.'''
if self.conversion_table.has_key((sect, opt)):
sect, opt = self.conversion_table[sect, opt]
! return self._options[sect, opt]
! def get(self, sect, opt):
! '''Get an option value.'''
! if self.conversion_table.has_key((sect, opt)):
! sect, opt = self.conversion_table[sect, opt]
! return self.get_option(sect, opt).get()
def __getitem__(self, key):
More information about the Spambayes-checkins
mailing list