class_docstr: This class implements rational numbers.
  
  In the two-argument form of the constructor, Fraction(8, 6) will
  produce a rational number equivalent to 4/3. Both arguments must
  be Rational. The numerator defaults to 0 and the denominator
  defaults to 1 so that Fraction(3) == 3 and Fraction() == 0.
  
  Fractions can also be constructed from:
  
    - numeric strings similar to those accepted by the
      float constructor (for example, '-2.3' or '1e10')
  
    - strings of the form '123/456'
  
    - float and Decimal instances
  
    - other Rational instances (including integers)
class_docstr_tok: ["This","class","implements","rational","numbers",".","In","the","two-argument","form","of","the","constructor",",","Fraction","(","8",",","6",")","will","produce","a","rational","number","equivalent","to","4\/3",".","Both","arguments","must","be","Rational",".","The","numerator","defaults","to","0","and","the","denominator","defaults","to","1","so","that","Fraction","(","3",")","==","3","and","Fraction","(",")","==","0",".","Fractions","can","also","be","constructed","from",":","-","numeric","strings","similar","to","those","accepted","by","the","float","constructor","(","for","example",",","'-2.3","'","or","'1e10","'",")","-","strings","of","the","form","'123\/456'","-","float","and","Decimal","instances","-","other","Rational","instances","(","including","integers",")"]
docstr: a ** b
  
  If b is not an integer, the result will be a float or complex
  since roots are generally irrational. If b is an integer, the
  result will be rational.
docstr_tok: ["a","*","*","b","If","b","is","not","an","integer",",","the","result","will","be","a","float","or","complex","since","roots","are","generally","irrational",".","If","b","is","an","integer",",","the","result","will","be","rational","."]
code: def __pow__(a, b):
      """a ** b
  
      If b is not an integer, the result will be a float or complex
      since roots are generally irrational. If b is an integer, the
      result will be rational.
  
      """
      if isinstance(b, numbers.Rational):
          if b.denominator == 1:
              power = b.numerator
              if power >= 0:
                  return Fraction(
                      a._numerator**power,
                      a._denominator**power,
                      _normalize=False,
                  )
              elif a._numerator >= 0:
                  return Fraction(
                      a._denominator**-power,
                      a._numerator**-power,
                      _normalize=False,
                  )
              else:
                  return Fraction(
                      (-a._denominator) ** -power,
                      (-a._numerator) ** -power,
                      _normalize=False,
                  )
          else:
              # A fractional power will generally produce an
              # irrational number.
              return float(a) ** float(b)
      else:
          return float(a) ** b
  
imports: from decimal import Decimal
  import math
  import numbers
  import operator
  import re
  import sys
label_desc: Use image node_id 18 for calling the Fraction obj's underlying member method code with example usage: obj.__pow__(a, b) and returns: unknown, unknown, Fraction, Fraction, Fraction