parameters: (obj)
return_statement: return base, bits, char
docstring: Return a bit-width name for a given type object
docstring_summary: Return a bit-width name for a given type object
docstring_tokens: Return a bit - width name for a given type object
function: def bitname(obj):
      """Return a bit-width name for a given type object"""
      name = obj.__name__
      base = ''
      char = ''
      try:
          if name[-1] == '_':
              newname = name[:-1]
          else:
              newname = name
          info = typeinfo[english_upper(newname)]
          assert(info[-1] == obj)  # sanity check
          bits = info[2]
  
      except KeyError:     # bit-width name
          base, bits = _evalname(name)
          char = base[0]
  
      if name == 'bool_':
          char = 'b'
          base = 'bool'
      elif name=='void':
          char = 'V'
          base = 'void'
      elif name=='object_':
          char = 'O'
          base = 'object'
          bits = 0
  
      if sys.version_info[0] >= 3:
          if name=='bytes_':
              char = 'S'
              base = 'bytes'
          elif name=='str_':
              char = 'U'
              base = 'str'
      else:
          if name=='string_':
              char = 'S'
              base = 'string'
          elif name=='unicode_':
              char = 'U'
              base = 'unicode'
  
      bytes = bits // 8
  
      if char != '' and bytes != 0:
          char = "%s%d" % (char, bytes)
  
      return base, bits, char
function_tokens: def bitname ( obj ) : name = obj . __name__ base = '' char = '' try : if name [ - 1 ] == '_' : newname = name [ : - 1 ] else : newname = name info = typeinfo [ english_upper ( newname ) ] assert ( info [ - 1 ] == obj ) # sanity check bits = info [ 2 ] except KeyError : # bit-width name base , bits = _evalname ( name ) char = base [ 0 ] if name == 'bool_' : char = 'b' base = 'bool' elif name == 'void' : char = 'V' base = 'void' elif name == 'object_' : char = 'O' base = 'object' bits = 0 if sys . version_info [ 0 ] >= 3 : if name == 'bytes_' : char = 'S' base = 'bytes' elif name == 'str_' : char = 'U' base = 'str' else : if name == 'string_' : char = 'S' base = 'string' elif name == 'unicode_' : char = 'U' base = 'unicode' bytes = bits // 8 if char != '' and bytes != 0 : char = "%s%d" % ( char , bytes ) return base , bits , char