def pack(self, fout):
        """
        Write the ConstantPool to the file-like object `fout`.

        .. note::

            Advanced usage only. You will typically never need to call this
            method as it will be calle=d for you when saving a ClassFile.

        :param fout: Any file-like object providing `write()`
        """
        write = fout.write
        write(pack('>H', self.raw_count))

        for constant in self:
            write(constant.pack())
def pack ( self , fout ) : write = fout . write write ( pack ( '>H' , self . raw_count ) ) for constant in self : write ( constant . pack ( ) )
Write the ConstantPool to the file-like object `fout`.

        .. note::

            Advanced usage only. You will typically never need to call this
            method as it will be calle=d for you when saving a ClassFile.

        :param fout: Any file-like object providing `write()`