def _encode_int(name, value, dummy0, dummy1):
 if ((-2147483648) <= value <= 2147483647):
  return (('\x10' + name) + _PACK_INT(value))
 else:
  try:
   return (('\x12' + name) + _PACK_LONG(value))
  except struct.error:
   raise OverflowError('BSON can only handle up to 8-byte ints')

def _encode_int ( name , value , dummy0 , dummy1 ) : if ( ( - 2147483648 ) <= value <= 2147483647 ) : return ( ( '\x10' + name ) + _PACK_INT ( value ) ) else : try : return ( ( '\x12' + name ) + _PACK_LONG ( value ) ) except struct . error : raise OverflowError ( 'BSON can only handle up to 8-byte ints' )
encode a python int .