def digit(uni_char, default_value=None):
 uni_char = unicod(uni_char)
 if (default_value is not None):
  return unicodedata.digit(uni_char, default_value)
 else:
  return unicodedata.digit(uni_char)

def digit ( uni_char , default_value = None ) : uni_char = unicod ( uni_char ) if ( default_value is not None ) : return unicodedata . digit ( uni_char , default_value ) else : return unicodedata . digit ( uni_char )
returns the digit value assigned to the unicode character uni_char as integer .