class_docstr: Exact rational type, currently only intended for internal use.
class_docstr_tok: ["Exact","rational","type",",","currently","only","intended","for","internal","use","."]
code: def __new__(cls, p, q=1):
      if type(p) is tuple:
          p, q = p
      elif hasattr(p, "_mpq_"):
          p, q = p._mpq_
      return create_reduced(p, q)
  
imports: import operator
  import sys
  from .libmp import int_types, mpf_hash, bitcount, from_man_exp, HASH_MODULUS
label_desc: Use image node_id 1 for calling the mpq obj's underlying member method code with example usage: obj.__new__(cls, p, q) and returns: create_reduced