def read_numeric(fmt, buff, byteorder='<STR_LIT>'):
try:<EOL><INDENT>fmt = fmt[byteorder]<EOL>return fmt.unpack(buff.read(fmt.size))[<NUM_LIT:0>]<EOL><DEDENT>except StructError:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>except KeyError as exc:<EOL><INDENT>raise ValueError('<STR_LIT>') from exc<EOL><DEDENT>
Read a numeric value from a file-like object.