Esempio n. 1
0
 def spell_guess(self, value):
     """
      If the value is an int, it is the maximum number of spell corrections
      per word. If it is True, an int value of 7 is assumed. A value of
      0 or False disables the spelling guesser.
      In case the spelling guesser is not disabled, run-on corrections will
      be issued too, not limited in their number.
     """
     if not isinstance(value, bool) and (not isinstance(value, int) or value < 0):
         raise TypeError("spell_guess must be set to bool or a non-negative integer")
     if isinstance(value, bool):
         value = 7 if value else 0
     clg.parse_options_set_spell_guess(self._obj, value)
Esempio n. 2
0
 def spell_guess(self, value):
     """
      If the value is an int, it is the maximum number of spell corrections
      per word. If it is True, an int value of 7 is assumed. A value of
      0 or False disables the spelling guesser.
      In case the spelling guesser is not disabled, run-on corrections will
      be issued too, not limited in their number.
     """
     if not isinstance(value, bool) and (not isinstance(value, int) or value < 0):
         raise TypeError("spell_guess must be set to bool or a non-negative integer")
     if isinstance(value, bool):
         value = 7 if value else 0
     clg.parse_options_set_spell_guess(self._obj, value)