def bitname(obj):
name = obj.__name__<EOL>base = '<STR_LIT>'<EOL>char = '<STR_LIT>'<EOL>try:<EOL><INDENT>if name[-<NUM_LIT:1>] == '<STR_LIT:_>':<EOL><INDENT>newname = name[:-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>newname = name<EOL><DEDENT>info = typeinfo[english_upper(newname)]<EOL>assert(info[-<NUM_LIT:1>] == obj)  <EOL>bits = info[<NUM_LIT:2>]<EOL><DEDENT>except KeyError:     <EOL><INDENT>base, bits = _evalname(name)<EOL>char = base[<NUM_LIT:0>]<EOL><DEDENT>if name == '<STR_LIT>':<EOL><INDENT>char = '<STR_LIT:b>'<EOL>base = '<STR_LIT:bool>'<EOL><DEDENT>elif name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT>'<EOL>base = '<STR_LIT>'<EOL><DEDENT>elif name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT:O>'<EOL>base = '<STR_LIT:object>'<EOL>bits = <NUM_LIT:0><EOL><DEDENT>elif name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT:M>'<EOL><DEDENT>elif name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT:m>'<EOL><DEDENT>if sys.version_info[<NUM_LIT:0>] >= <NUM_LIT:3>:<EOL><INDENT>if name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT:S>'<EOL>base = '<STR_LIT>'<EOL><DEDENT>elif name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT>'<EOL>base = '<STR_LIT:str>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT:S>'<EOL>base = '<STR_LIT:string>'<EOL><DEDENT>elif name=='<STR_LIT>':<EOL><INDENT>char = '<STR_LIT>'<EOL>base = '<STR_LIT>'<EOL><DEDENT><DEDENT>bytes = bits // <NUM_LIT:8><EOL>if char != '<STR_LIT>' and bytes != <NUM_LIT:0>:<EOL><INDENT>char = "<STR_LIT>" % (char, bytes)<EOL><DEDENT>return base, bits, char<EOL>
Return a bit-width name for a given type object