def WrapImmutable(cls, pyobj, what):
d = cls.types_dict<EOL>if type(pyobj) is bool:  <EOL><INDENT>pyclass = d[int]<EOL><DEDENT>elif (type(pyobj) in d) is True:<EOL><INDENT>pyclass = d[type(pyobj)]<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>' %(<EOL>list(d.keys()),type(pyobj)))<EOL><DEDENT>newobj = pyclass(pyobj)<EOL>newobj.typecode = what<EOL>return newobj<EOL>
return a wrapper for pyobj, with typecode attribute set.
        Parameters:
            pyobj -- instance of builtin type (immutable)
            what -- typecode describing the data