parameters: (self, candidate=None)
return_statement: return text, signpos, right_signpos
docstring: Return a signed value by adding a "-" prefix if the value
              is set to negative, or a space if positive.
docstring_summary: Return a signed value by adding a "-" prefix if the value
              is set to negative, or a space if positive.
docstring_tokens: Return a signed value by adding a - prefix if the value is set to negative or a space if positive .
function: def _getSignedValue(self, candidate=None):
          """ Return a signed value by adding a "-" prefix if the value
              is set to negative, or a space if positive.
          """
  ##        dbg('MaskedEditMixin::_getSignedValue; candidate="%s"' % candidate, indent=1)
          if candidate is None: text = self._GetValue()
          else: text = candidate
  
  
          abstext, signpos, right_signpos = self._getAbsValue(text)
          if self._signOk:
              if abstext is None:
  ##                dbg(indent=0)
                  return abstext, signpos, right_signpos
  
              if self._isNeg or text[signpos] in ('-', '('):
                  if self._useParens:
                      sign = '('
                  else:
                      sign = '-'
              else:
                  sign = ' '
              if abstext[signpos] not in string.digits:
                  text = abstext[:signpos] + sign + abstext[signpos+1:]
              else:
                  # this can happen if value passed is too big; sign assumed to be
                  # in position 0, but if already filled with a digit, prepend sign...
                  text = sign + abstext
              if self._useParens and text.find('(') != -1:
                  text = text[:right_signpos] + ')' + text[right_signpos+1:]
          else:
              text = abstext
  ##        dbg('signedtext = "%s"' % text, 'signpos:', signpos, 'right_signpos', right_signpos)
  ##        dbg(indent=0)
          return text, signpos, right_signpos
function_tokens: def _getSignedValue ( self , candidate = None ) : ##        dbg('MaskedEditMixin::_getSignedValue; candidate="%s"' % candidate, indent=1) if candidate is None : text = self . _GetValue ( ) else : text = candidate abstext , signpos , right_signpos = self . _getAbsValue ( text ) if self . _signOk : if abstext is None : ##                dbg(indent=0) return abstext , signpos , right_signpos if self . _isNeg or text [ signpos ] in ( '-' , '(' ) : if self . _useParens : sign = '(' else : sign = '-' else : sign = ' ' if abstext [ signpos ] not in string . digits : text = abstext [ : signpos ] + sign + abstext [ signpos + 1 : ] else : # this can happen if value passed is too big; sign assumed to be # in position 0, but if already filled with a digit, prepend sign... text = sign + abstext if self . _useParens and text . find ( '(' ) != - 1 : text = text [ : right_signpos ] + ')' + text [ right_signpos + 1 : ] else : text = abstext ##        dbg('signedtext = "%s"' % text, 'signpos:', signpos, 'right_signpos', right_signpos) ##        dbg(indent=0) return text , signpos , right_signpos