Module ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body ImportFrom alias Assign NameStore Call NameLoad NameLoad If CompareLtE Call NameLoad NameLoad BinOpMult NameLoad Call NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body ImportFrom alias alias If CompareEq NameLoad Num body Return BinOpMult Call NameLoad BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num Num Call NameLoad Num BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num Num orelse Raise Call NameLoad NameLoad NameLoad decorator_list Assign NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults body If CompareLt NameLoad Num body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad ListLoad For NameStore Call AttributeLoad NameLoad attr Num BinOpAdd NameLoad Num body Assign TupleStore NameStore NameStore TupleLoad Num NameLoad While NameLoad body AugAssignFloorDiv NameStore NameLoad If CompareGt NameLoad Num body If CompareEq BinOpBitAnd NameLoad Num Num body AugAssignMult NameStore NameLoad orelse Break If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num BinOpAdd BinOpFloorDiv NameLoad Num Num body If CompareEq BinOpBitAnd BinOpFloorDiv NameLoad NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameStore Num For NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpFloorDiv NameLoad Num Num BinOpAdd NameLoad Num body AugAssignMult NameStore NameLoad For NameStore NameLoad body AugAssignMult NameStore NameLoad Return BinOpMult NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareLt NameLoad Num body Return Num orelse Return BinOpMult BinOpPow Call AttributeLoad NameLoad attr BinOpFloorDiv NameLoad Num Num Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad If AttributeLoad NameLoad attr body If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr If CompareLt NameLoad Num body If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Num For NameStore Call NameLoad Num Num body AugAssignMult NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index BinOpSub NameLoad Num orelse Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Str Assign NameStore BinOpMult Call AttributeLoad NameLoad attr NameLoad BinOpPow Num BinOpSub NameLoad NameLoad Return Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Return Call NameLoad BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Str keyword NameLoad Return Call NameLoad NameLoad TupleLoad NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If AttributeLoad NameLoad attr body Return AttributeLoad BinOpSub NameLoad Num attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot NameLoad body Return AttributeLoad NameLoad attr orelse If CompareEq NameLoad Num body Return AttributeLoad NameLoad attr Return BinOpMult BinOpSub NameLoad Num BinOpAdd Call AttributeLoad NameLoad attr BinOpSub NameLoad Num Call AttributeLoad NameLoad attr BinOpSub NameLoad Num decorator_list NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Return BinOpDiv Call NameLoad BinOpAdd NameLoad Num Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str If AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Assign NameStore BinOpDiv NameLoad Num Return BinOpMult BinOpPow Num NameLoad Call NameLoad NameLoad Return BinOpDiv Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad Num If AttributeLoad NameLoad attr body Return BinOpDiv BinOpMult NameLoad BinOpPow AttributeLoad NameLoad attr BinOpDiv BinOpSub Num NameLoad Num Call NameLoad UnaryOpUSub NameLoad Raise Call NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return NameLoad If AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return NameLoad If AttributeLoad NameLoad attr body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If AttributeLoad NameLoad attr body If AttributeLoad BinOpAdd NameLoad Num attr body Return NameLoad If AttributeLoad NameLoad attr body Return AttributeLoad BinOpAdd NameLoad Num attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If AttributeLoad NameLoad attr body Return AttributeLoad BinOpAdd NameLoad Num attr If AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return NameLoad If AttributeLoad NameLoad attr body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If AttributeLoad NameLoad attr body If AttributeLoad BinOpAdd NameLoad Num attr body Return NameLoad If AttributeLoad NameLoad attr body Return AttributeLoad BinOpDiv BinOpAdd NameLoad Num Num attr decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias alias alias Return BinOpMult BinOpMult BinOpPow Num BinOpDiv NameLoad Num Call NameLoad BinOpAdd BinOpDiv NameLoad Num Num Call NameLoad TupleLoad Num Call NameLoad Call NameLoad NameLoad Num Num TupleLoad Call NameLoad BinOpDiv Num NameLoad Call NameLoad Call NameLoad NameLoad Num Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareIs NameLoad AttributeLoad NameLoad attr CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return Call NameLoad NameLoad orelse If AttributeLoad NameLoad attr body If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs NameLoad AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse Return AttributeLoad NameLoad attr orelse TryExcept body Assign TupleStore NameStore NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpAdd NameLoad NameLoad Call NameLoad Num Call NameLoad NameLoad Num If BoolOpOr CompareGt Call NameLoad AttributeLoad NameLoad attr Num CompareLtE Call AttributeLoad NameLoad attr Num body Return Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpAdd NameLoad NameLoad Call NameLoad Num Call NameLoad NameLoad Num orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Return Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad attr Call NameLoad Num Call NameLoad NameLoad Num orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse TryExcept body Assign TupleStore NameStore NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return BinOpDiv Num Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpSub NameLoad NameLoad Call NameLoad Num BinOpAdd Call NameLoad Call NameLoad NameLoad Num Num If BoolOpOr CompareGt Call NameLoad AttributeLoad NameLoad attr Num CompareLtE Call AttributeLoad NameLoad attr Num body Return BinOpDiv Num Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpSub NameLoad NameLoad Call NameLoad Num BinOpAdd Call NameLoad Call NameLoad NameLoad Num Num orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Return BinOpDiv Num Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad BinOpSub NameLoad NameLoad attr Call NameLoad Num BinOpAdd Call NameLoad Call NameLoad NameLoad Num Num decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body ImportFrom alias Return BinOpDiv Call NameLoad BinOpAdd NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call NameLoad BinOpSub BinOpAdd NameLoad NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return BinOpDiv Call NameLoad BinOpSub BinOpAdd NameLoad NameLoad Num Call NameLoad BinOpSub NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return BinOpMult Call NameLoad NameLoad Call NameLoad BinOpSub BinOpAdd NameLoad NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad TupleLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Import alias identifier Return Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareIs NameLoad AttributeLoad NameLoad attr CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If BoolOpAnd AttributeLoad NameLoad attr CompareEq NameLoad NameLoad body Return Call NameLoad NameLoad orelse If AttributeLoad NameLoad attr body If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs NameLoad AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse Return AttributeLoad NameLoad attr orelse TryExcept body Assign TupleStore NameStore NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpSub NameLoad NameLoad Call NameLoad Num Call NameLoad NameLoad Num If BoolOpOr CompareGt Call NameLoad AttributeLoad NameLoad attr Num CompareLtE Call AttributeLoad NameLoad attr Num body Return Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpSub NameLoad NameLoad Call NameLoad Num Call NameLoad NameLoad Num orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Return Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad BinOpSub NameLoad NameLoad attr Call NameLoad Num Call NameLoad NameLoad Num orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse TryExcept body Assign TupleStore NameStore NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return BinOpDiv Num Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpAdd NameLoad NameLoad Call NameLoad Num BinOpAdd Call NameLoad Call NameLoad NameLoad Num Num If BoolOpOr CompareGt Call NameLoad AttributeLoad NameLoad attr Num CompareLtE Call AttributeLoad NameLoad attr Num body Return BinOpDiv Num Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad BinOpAdd NameLoad NameLoad Call NameLoad Num BinOpAdd Call NameLoad Call NameLoad NameLoad Num Num orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Return BinOpDiv Num Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad attr Call NameLoad Num BinOpAdd Call NameLoad Call NameLoad NameLoad Num Num decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body ImportFrom alias Return BinOpDiv BinOpMult BinOpPow Num NameLoad Call NameLoad BinOpSub NameLoad NameLoad Call NameLoad UnaryOpUSub NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call NameLoad BinOpAdd BinOpSub NameLoad NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return BinOpMult Call NameLoad NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return BinOpDiv Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad TupleLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Import alias identifier Return Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list decorator_list Assign NameStore NameLoad Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body ImportFrom alias If CompareEq NameLoad Num body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Return BinOpMult Call NameLoad NameLoad NameLoad BinOpSub Call NameLoad Num BinOpAdd NameLoad Num Call NameLoad Num BinOpAdd BinOpSub NameLoad NameLoad Num orelse If CompareEq NameLoad Num body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Return BinOpMult Call NameLoad NameLoad NameLoad BinOpSub Call NameLoad Num BinOpAdd BinOpSub NameLoad NameLoad Num Call NameLoad Num BinOpAdd NameLoad Num orelse Raise Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body If BoolOpAnd AttributeLoad NameLoad attr CompareGtE NameLoad Num body Assign TupleStore NameStore NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad If CompareGt NameLoad NameLoad body Return AttributeLoad NameLoad attr orelse If CompareGt NameLoad BinOpFloorDiv NameLoad Num body Assign NameStore BinOpSub NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad NameLoad Num For NameStore Call AttributeLoad NameLoad attr Num BinOpAdd NameLoad Num body If CompareGt NameLoad BinOpSub NameLoad NameLoad body AugAssignMult NameStore NameLoad orelse If CompareGt NameLoad BinOpFloorDiv NameLoad Num body Continue orelse If CompareGt NameLoad NameLoad body If CompareLt BinOpMod NameLoad NameLoad BinOpMod NameLoad NameLoad body AugAssignMult NameStore NameLoad orelse Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign NameStore NameStore Num While CompareGt NameLoad Num body Assign NameStore Call NameLoad CompareLt BinOpMod NameLoad NameLoad BinOpAdd BinOpMod NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad BinOpFloorDiv NameLoad NameLoad BinOpFloorDiv NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad If CompareGt NameLoad Num body AugAssignMult NameStore BinOpPow NameLoad NameLoad Return Call NameLoad NameLoad orelse Assign NameStore NameStore BinOpAdd BinOpSub NameLoad NameLoad Num For NameStore Call NameLoad Num BinOpAdd NameLoad Num body AugAssignAdd NameStore Num AugAssignMult NameStore NameLoad AugAssignDiv NameStore NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareIs AttributeLoad NameLoad attr NameLoad body If AttributeLoad BinOpSub NameLoad Num attr body Return NameLoad orelse If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr CompareGt NameLoad Num AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If AttributeLoad NameLoad attr body Return Call NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If BoolOpAnd AttributeLoad NameLoad attr CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpSub NameLoad NameLoad If AttributeLoad NameLoad attr body If CompareEq NameLoad AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If CompareLt NameLoad Num body Return AttributeLoad NameLoad attr orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpAdd BinOpSub NameLoad NameLoad Num For NameStore Call NameLoad Num BinOpAdd NameLoad Num body AugAssignMult NameStore BinOpAdd BinOpSub NameLoad NameLoad NameLoad AugAssignDiv NameStore NameLoad Return NameLoad orelse Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return BinOpDiv Call NameLoad NameLoad BinOpMult Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body ImportFrom alias Return BinOpDiv Call NameLoad BinOpAdd NameLoad Num BinOpMult Call NameLoad BinOpAdd NameLoad Num Call NameLoad BinOpAdd BinOpSub NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return BinOpDiv Call NameLoad NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad orelse If CompareIs AttributeLoad NameLoad attr NameLoad body Return NameLoad decorator_list decorator_list
N/A __future__ print_function division sympy.core S sympify Dummy Mod sympy.core.function Function ArgumentIndexError sympy.core.logic fuzzy_and sympy.core.numbers Integer pi sympy.core.relational Eq sympy.ntheory sieve math sqrt _sqrt sympy.core.compatibility reduce range sympy.core.cache cacheit sympy.polys.polytools poly_from_expr sympy.polys.polyerrors PolificationFailed CombinatorialFunction N/A Function N/A N/A Base class for combinatorial functions.  _eval_simplify N/A N/A self ratio measure N/A N/A sympy.simplify.simplify combsimp N/A expr N/A combsimp self N/A N/A N/A measure expr N/A ratio N/A measure self N/A N/A expr N/A self N/A N/A factorial N/A CombinatorialFunction N/A N/A Implementation of factorial function over nonnegative integers.
       By convention (consistent with the gamma function and the binomial
       coefficients), factorial of a negative integer is complex infinity.

       The factorial is very important in combinatorics where it gives
       the number of ways in which `n` objects can be permuted. It also
       arises in calculus, probability, number theory, etc.

       There is strict relation of factorial with gamma function. In
       fact n! = gamma(n+1) for nonnegative integers. Rewrite of this
       kind is very useful in case of combinatorial simplification.

       Computation of the factorial is done using two algorithms. For
       small arguments a precomputed look up table is used. However for bigger
       input algorithm Prime-Swing is used. It is the fastest algorithm
       known and computes n! via prime factorization of special class
       of numbers, called here the 'Swing Numbers'.

       Examples
       ========

       >>> from sympy import Symbol, factorial, S
       >>> n = Symbol('n', integer=True)

       >>> factorial(0)
       1

       >>> factorial(7)
       5040

       >>> factorial(-2)
       zoo

       >>> factorial(n)
       factorial(n)

       >>> factorial(2*n)
       factorial(2*n)

       >>> factorial(S(1)/2)
       factorial(1/2)

       See Also
       ========

       factorial2, RisingFactorial, FallingFactorial
     fdiff N/A N/A self argindex N/A 1 N/A sympy gamma polygamma N/A N/A argindex 1 N/A N/A N/A N/A gamma N/A N/A N/A self args N/A 0 1 N/A polygamma 0 N/A N/A N/A self args N/A 0 1 N/A N/A N/A ArgumentIndexError self argindex N/A N/A _small_swing N/A 1 1 1 3 3 15 5 35 35 315 63 693 231 3003 429 6435 6435 109395 12155 230945 46189 969969 88179 2028117 676039 16900975 1300075 35102025 5014575 145422675 9694845 300540195 300540195 N/A _small_factorials N/A _swing N/A N/A cls n N/A N/A N/A N/A n 33 N/A N/A N/A N/A cls _small_swing N/A n N/A N/A N/A N primes N/A N/A int N/A _sqrt n N/A N/A prime N/A N/A sieve primerange 3 N/A N 1 N/A N/A N/A p q N/A 1 n N/A True N/A N/A q prime N/A N/A q 0 N/A N/A N/A N/A q 1 1 N/A N/A p prime N/A N/A N/A N/A p 1 N/A N/A N/A N/A primes append p N/A prime N/A N/A sieve primerange N/A N 1 N/A N/A n 3 1 N/A N/A N/A N/A N/A n prime 1 1 N/A N/A N/A N/A primes append prime N/A L_product R_product 1 N/A prime N/A N/A sieve primerange N/A N/A n 2 1 N/A n 1 N/A N/A L_product prime N/A prime primes N/A N/A R_product prime N/A N/A L_product R_product N/A classmethod _recursive N/A N/A cls n N/A N/A N/A N/A n 2 N/A N/A 1 N/A N/A N/A N/A N/A N/A cls _recursive N/A n 2 2 N/A N/A cls _swing n N/A classmethod eval N/A N/A cls n N/A N/A N/A n N/A sympify n N/A N/A n is_Number N/A N/A N/A n N/A S Zero N/A N/A N/A S One N/A N/A N/A n N/A S Infinity N/A N/A N/A S Infinity N/A N/A N/A n is_Integer N/A N/A N/A n is_negative N/A N/A N/A S ComplexInfinity N/A N/A n N/A n p N/A N/A n 20 N/A N/A N/A N/A cls _small_factorials N/A N/A result 1 N/A i N/A range 1 20 N/A N/A result i N/A N/A N/A N/A cls _small_factorials append result N/A result N/A N/A cls _small_factorials N/A N/A n 1 N/A N/A bits N/A N/A N/A bin n count 1 N/A result N/A N/A N/A cls _recursive n N/A 2 N/A n bits N/A N/A Integer result N/A classmethod _eval_rewrite_as_gamma N/A N/A self n N/A N/A sympy gamma N/A N/A gamma N/A n 1 N/A _eval_rewrite_as_Product N/A N/A self n N/A N/A sympy Product N/A N/A N/A n is_nonnegative N/A n is_integer N/A N/A i N/A Dummy i integer True N/A N/A Product i N/A i 1 n N/A _eval_is_integer N/A N/A self N/A N/A N/A N/A N/A N/A N/A self args N/A 0 is_integer N/A N/A N/A self args N/A 0 is_nonnegative N/A N/A True N/A _eval_is_positive N/A N/A self N/A N/A N/A N/A N/A N/A N/A self args N/A 0 is_integer N/A N/A N/A self args N/A 0 is_nonnegative N/A N/A True N/A _eval_is_composite N/A N/A self N/A N/A N/A x N/A N/A self args N/A 0 N/A N/A x is_integer N/A N/A N/A N/A x 3 is_nonnegative N/A _eval_is_real N/A N/A self N/A N/A N/A x N/A N/A self args N/A 0 N/A N/A N/A x is_nonnegative N/A x is_noninteger N/A N/A True N/A N/A MultiFactorial N/A CombinatorialFunction N/A N/A N/A subfactorial N/A CombinatorialFunction N/A N/A The subfactorial counts the derangements of n items and is
    defined for non-negative integers as::

              ,
             |  1                             for n = 0
        !n = {  0                             for n = 1
             |  (n - 1)*(!(n - 1) + !(n - 2)) for n > 1
              `

    It can also be written as int(round(n!/exp(1))) but the recursive
    definition with caching is implemented for this function.

    An interesting analytic expression is the following [2]_

    .. math:: !x = \Gamma(x + 1, -1)/e

    which is valid for non-negative integers x. The above formula
    is not very useful incase of non-integers. :math:`\Gamma(x + 1, -1)` is
    single-valued only for integral arguments x, elsewhere on the positive real
    axis it has an infinite number of branches none of which are real.

    References
    ==========

    .. [1] http://en.wikipedia.org/wiki/Subfactorial
    .. [2] http://mathworld.wolfram.com/Subfactorial.html

    Examples
    ========

    >>> from sympy import subfactorial
    >>> from sympy.abc import n
    >>> subfactorial(n + 1)
    subfactorial(n + 1)
    >>> subfactorial(5)
    44

    See Also
    ========

    sympy.functions.combinatorial.factorials.factorial,
    sympy.utilities.iterables.generate_derangements,
    sympy.functions.special.gamma_functions.uppergamma
     _eval N/A N/A self n N/A N/A N/A N/A n N/A N/A N/A S One N/A N/A N/A n 1 N/A N/A N/A S Zero N/A N/A N/A n 1 N/A N/A N/A self _eval N/A n 1 N/A N/A self _eval N/A n 2 N/A classmethod cacheit eval N/A N/A cls arg N/A N/A N/A N/A arg is_Number N/A N/A N/A N/A arg is_Integer N/A arg is_nonnegative N/A N/A N/A N/A cls _eval arg N/A N/A N/A arg N/A S NaN N/A N/A N/A S NaN N/A N/A N/A arg N/A S Infinity N/A N/A N/A S Infinity N/A classmethod _eval_is_even N/A N/A self N/A N/A N/A N/A N/A N/A N/A self args N/A 0 is_odd N/A N/A N/A self args N/A 0 is_nonnegative N/A N/A True N/A _eval_is_integer N/A N/A self N/A N/A N/A N/A N/A N/A N/A self args N/A 0 is_integer N/A N/A N/A self args N/A 0 is_nonnegative N/A N/A True N/A _eval_rewrite_as_uppergamma N/A N/A self arg N/A N/A sympy uppergamma N/A N/A N/A uppergamma N/A arg 1 -1 N/A S Exp1 N/A _eval_is_nonnegative N/A N/A self N/A N/A N/A N/A N/A N/A N/A self args N/A 0 is_integer N/A N/A N/A self args N/A 0 is_nonnegative N/A N/A True N/A _eval_is_odd N/A N/A self N/A N/A N/A N/A N/A N/A N/A self args N/A 0 is_even N/A N/A N/A self args N/A 0 is_nonnegative N/A N/A True N/A N/A factorial2 N/A CombinatorialFunction N/A N/A The double factorial n!!, not to be confused with (n!)!

    The double factorial is defined for nonnegative integers and for odd
    negative integers as::

               ,
              |  n*(n - 2)*(n - 4)* ... * 1    for n positive odd
        n!! = {  n*(n - 2)*(n - 4)* ... * 2    for n positive even
              |  1                             for n = 0
              |  (n+2)!! / (n+2)               for n negative odd
               `

    References
    ==========
    .. [1] https://en.wikipedia.org/wiki/Double_factorial

    Examples
    ========

    >>> from sympy import factorial2, var
    >>> var('n')
    n
    >>> factorial2(n + 1)
    factorial2(n + 1)
    >>> factorial2(5)
    15
    >>> factorial2(-1)
    1
    >>> factorial2(-5)
    1/3

    See Also
    ========

    factorial, RisingFactorial, FallingFactorial
     eval N/A N/A cls arg N/A N/A N/A N/A arg is_Number N/A N/A N/A N/A arg is_Integer N/A N/A N/A ValueError argument must be nonnegative integer or negative odd integer N/A N/A arg is_nonnegative N/A N/A N/A arg is_even N/A N/A k N/A arg 2 N/A N/A N/A 2 k N/A factorial k N/A N/A N/A factorial arg N/A factorial2 N/A arg 1 N/A N/A arg is_odd N/A N/A N/A N/A arg N/A N/A S NegativeOne N/A N/A 1 arg 2 N/A factorial2 N/A arg N/A N/A ValueError argument must be nonnegative integer or negative odd integer N/A classmethod _eval_is_even N/A N/A self N/A N/A N/A n N/A N/A self args N/A 0 N/A N/A n is_integer N/A N/A N/A n is_odd N/A N/A False N/A N/A n is_even N/A N/A N/A n is_positive N/A N/A True N/A N/A n is_zero N/A N/A False N/A _eval_is_integer N/A N/A self N/A N/A N/A n N/A N/A self args N/A 0 N/A N/A n is_integer N/A N/A N/A N/A n 1 is_nonnegative N/A N/A True N/A N/A n is_odd N/A N/A N/A N/A n 3 is_nonnegative N/A _eval_is_odd N/A N/A self N/A N/A N/A n N/A N/A self args N/A 0 N/A N/A n is_odd N/A N/A N/A N/A n 3 is_nonnegative N/A N/A n is_even N/A N/A N/A n is_positive N/A N/A False N/A N/A n is_zero N/A N/A True N/A _eval_is_positive N/A N/A self N/A N/A N/A n N/A N/A self args N/A 0 N/A N/A n is_integer N/A N/A N/A N/A n 1 is_nonnegative N/A N/A True N/A N/A n is_odd N/A N/A N/A N/A N/A n 1 2 is_even N/A _eval_rewrite_as_gamma N/A N/A self n N/A N/A sympy gamma Piecewise sqrt N/A N/A N/A N/A 2 N/A n 2 N/A gamma N/A N/A n 2 1 N/A Piecewise N/A 1 N/A Eq N/A Mod n 2 0 N/A N/A sqrt N/A 2 pi N/A Eq N/A Mod n 2 1 N/A N/A RisingFactorial N/A CombinatorialFunction N/A N/A Rising factorial (also called Pochhammer symbol) is a double valued
    function arising in concrete mathematics, hypergeometric functions
    and series expansions. It is defined by:

                rf(x, k) = x * (x + 1) * ... * (x + k - 1)

    where 'x' can be arbitrary expression and 'k' is an integer. For
    more information check "Concrete mathematics" by Graham, pp. 66
    or visit http://mathworld.wolfram.com/RisingFactorial.html page.

    When x is a polynomial f of a single variable y of order >= 1,
    rf(x,k) = f(y) * f(y+1) * ... * f(x+k-1) as described in
    Peter Paule, "Greatest Factorial Factorization and Symbolic Summation",
    Journal of Symbolic Computation, vol. 20, pp. 235-268, 1995.

    Examples
    ========

    >>> from sympy import rf, symbols, factorial, ff, binomial
    >>> from sympy.abc import x
    >>> n, k = symbols('n k', integer=True)
    >>> rf(x, 0)
    1
    >>> rf(1, 5)
    120
    >>> rf(x, 5) == x*(1 + x)*(2 + x)*(3 + x)*(4 + x)
    True
    >>> rf(x**3, 2)
    Poly(x**6 + 3*x**5 + 3*x**4 + x**3, x, domain='ZZ')

    Rewrite

    >>> rf(x, k).rewrite(ff)
    FallingFactorial(k + x - 1, k)
    >>> rf(x, k).rewrite(binomial)
    binomial(k + x - 1, k)*factorial(k)
    >>> rf(n, k).rewrite(factorial)
    factorial(k + n - 1)/factorial(n - 1)

    See Also
    ========

    factorial, factorial2, FallingFactorial

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Pochhammer_symbol
     eval N/A N/A cls x k N/A N/A N/A x N/A sympify x N/A k N/A sympify k N/A N/A N/A x N/A S NaN N/A k N/A S NaN N/A N/A N/A S NaN N/A N/A N/A x N/A S One N/A N/A N/A factorial k N/A N/A N/A k is_Integer N/A N/A N/A k N/A S Zero N/A N/A N/A S One N/A N/A N/A k is_positive N/A N/A N/A x N/A S Infinity N/A N/A N/A S Infinity N/A N/A N/A x N/A S NegativeInfinity N/A N/A N/A k is_odd N/A N/A N/A S NegativeInfinity N/A N/A N/A S Infinity N/A N/A N/A N/A N/A F opt N/A poly_from_expr x N/A N/A N/A PolificationFailed N/A N/A N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 0 N/A int k 1 N/A N/A N/A N/A len N/A opt gens 1 N/A N/A N/A F degree 1 N/A N/A N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 0 N/A int k 1 N/A N/A v N/A N/A opt gens N/A 0 N/A N/A reduce N/A N/A N/A r i N/A N/A r N/A N/A N/A N/A F subs v N/A v i expand N/A range 0 N/A int k 1 N/A N/A N/A x N/A S Infinity N/A N/A N/A S Infinity N/A N/A N/A x N/A S NegativeInfinity N/A N/A N/A S Infinity N/A N/A N/A N/A N/A F opt N/A poly_from_expr x N/A N/A N/A PolificationFailed N/A N/A N/A 1 N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 1 N/A N/A abs N/A int k 1 1 N/A N/A N/A N/A len N/A opt gens 1 N/A N/A N/A F degree 1 N/A N/A N/A 1 N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 1 N/A N/A abs N/A int k 1 1 N/A N/A v N/A N/A opt gens N/A 0 N/A N/A 1 N/A reduce N/A N/A N/A r i N/A N/A r N/A N/A N/A N/A F subs v N/A v i expand N/A range 1 N/A N/A abs N/A int k 1 1 N/A classmethod _eval_rewrite_as_gamma N/A N/A self x k N/A N/A sympy gamma N/A N/A N/A gamma N/A x k N/A gamma x N/A _eval_rewrite_as_FallingFactorial N/A N/A self x k N/A N/A N/A N/A FallingFactorial N/A N/A x k 1 k N/A _eval_rewrite_as_factorial N/A N/A self x k N/A N/A N/A N/A N/A x is_integer N/A k is_integer N/A N/A N/A N/A factorial N/A N/A k x 1 N/A factorial N/A x 1 N/A _eval_rewrite_as_binomial N/A N/A self x k N/A N/A N/A N/A k is_integer N/A N/A N/A N/A factorial k N/A binomial N/A N/A x k 1 k N/A _eval_is_integer N/A N/A self N/A N/A N/A N/A fuzzy_and N/A N/A N/A N/A self args N/A 0 is_integer N/A N/A N/A self args N/A 1 is_integer N/A N/A N/A self args N/A 1 is_nonnegative N/A _sage_ N/A N/A self N/A N/A N/A sage.all sage N/A N/A N/A sage rising_factorial N/A N/A N/A N/A self args N/A 0 _sage_ N/A N/A N/A N/A self args N/A 1 _sage_ N/A N/A FallingFactorial N/A CombinatorialFunction N/A N/A Falling factorial (related to rising factorial) is a double valued
    function arising in concrete mathematics, hypergeometric functions
    and series expansions. It is defined by

                ff(x, k) = x * (x-1) * ... * (x - k+1)

    where 'x' can be arbitrary expression and 'k' is an integer. For
    more information check "Concrete mathematics" by Graham, pp. 66
    or visit http://mathworld.wolfram.com/FallingFactorial.html page.

    When x is a polynomial f of a single variable y of order >= 1,
    ff(x,k) = f(y) * f(y-1) * ... * f(x-k+1) as described in
    Peter Paule, "Greatest Factorial Factorization and Symbolic Summation",
    Journal of Symbolic Computation, vol. 20, pp. 235-268, 1995.

    >>> from sympy import ff, factorial, rf, gamma, polygamma, binomial, symbols
    >>> from sympy.abc import x, k
    >>> n, m = symbols('n m', integer=True)
    >>> ff(x, 0)
    1
    >>> ff(5, 5)
    120
    >>> ff(x, 5) == x*(x-1)*(x-2)*(x-3)*(x-4)
    True
    >>> ff(x**2, 2)
    Poly(x**4 - 2*x**3 + x**2, x, domain='ZZ')
    >>> ff(n, n)
    factorial(n)

    Rewrite

    >>> ff(x, k).rewrite(gamma)
    (-1)**k*gamma(k - x)/gamma(-x)
    >>> ff(x, k).rewrite(rf)
    RisingFactorial(-k + x + 1, k)
    >>> ff(x, m).rewrite(binomial)
    binomial(x, m)*factorial(m)
    >>> ff(n, m).rewrite(factorial)
    factorial(n)/factorial(-m + n)

    See Also
    ========

    factorial, factorial2, RisingFactorial

    References
    ==========

    .. [1] http://mathworld.wolfram.com/FallingFactorial.html
     eval N/A N/A cls x k N/A N/A N/A x N/A sympify x N/A k N/A sympify k N/A N/A N/A x N/A S NaN N/A k N/A S NaN N/A N/A N/A S NaN N/A N/A N/A N/A k is_integer N/A x k N/A N/A N/A factorial x N/A N/A N/A k is_Integer N/A N/A N/A k N/A S Zero N/A N/A N/A S One N/A N/A N/A k is_positive N/A N/A N/A x N/A S Infinity N/A N/A N/A S Infinity N/A N/A N/A x N/A S NegativeInfinity N/A N/A N/A k is_odd N/A N/A N/A S NegativeInfinity N/A N/A N/A S Infinity N/A N/A N/A N/A N/A F opt N/A poly_from_expr x N/A N/A N/A PolificationFailed N/A N/A N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 0 N/A int k 1 N/A N/A N/A N/A len N/A opt gens 1 N/A N/A N/A F degree 1 N/A N/A N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 0 N/A int k 1 N/A N/A v N/A N/A opt gens N/A 0 N/A N/A reduce N/A N/A N/A r i N/A N/A r N/A N/A N/A N/A F subs v N/A v i expand N/A range 0 N/A int k 1 N/A N/A N/A x N/A S Infinity N/A N/A N/A S Infinity N/A N/A N/A x N/A S NegativeInfinity N/A N/A N/A S Infinity N/A N/A N/A N/A N/A F opt N/A poly_from_expr x N/A N/A N/A PolificationFailed N/A N/A N/A 1 N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 1 N/A N/A abs N/A int k 1 1 N/A N/A N/A N/A len N/A opt gens 1 N/A N/A N/A F degree 1 N/A N/A N/A 1 N/A reduce N/A N/A N/A r i N/A N/A r N/A x i N/A range 1 N/A N/A abs N/A int k 1 1 N/A N/A v N/A N/A opt gens N/A 0 N/A N/A 1 N/A reduce N/A N/A N/A r i N/A N/A r N/A N/A N/A N/A F subs v N/A v i expand N/A range 1 N/A N/A abs N/A int k 1 1 N/A classmethod _eval_rewrite_as_gamma N/A N/A self x k N/A N/A sympy gamma N/A N/A N/A N/A -1 k N/A gamma N/A k x N/A gamma N/A x N/A _eval_rewrite_as_RisingFactorial N/A N/A self x k N/A N/A N/A N/A rf N/A N/A x k 1 k N/A _eval_rewrite_as_binomial N/A N/A self x k N/A N/A N/A N/A k is_integer N/A N/A N/A N/A factorial k N/A binomial x k N/A _eval_rewrite_as_factorial N/A N/A self x k N/A N/A N/A N/A N/A x is_integer N/A k is_integer N/A N/A N/A N/A factorial x N/A factorial N/A x k N/A _eval_is_integer N/A N/A self N/A N/A N/A N/A fuzzy_and N/A N/A N/A N/A self args N/A 0 is_integer N/A N/A N/A self args N/A 1 is_integer N/A N/A N/A self args N/A 1 is_nonnegative N/A _sage_ N/A N/A self N/A N/A N/A sage.all sage N/A N/A N/A sage falling_factorial N/A N/A N/A N/A self args N/A 0 _sage_ N/A N/A N/A N/A self args N/A 1 _sage_ N/A N/A N/A rf RisingFactorial N/A ff FallingFactorial binomial N/A CombinatorialFunction N/A N/A Implementation of the binomial coefficient. It can be defined
    in two ways depending on its desired interpretation:

        C(n,k) = n!/(k!(n-k)!)   or   C(n, k) = ff(n, k)/k!

    First, in a strict combinatorial sense it defines the
    number of ways we can choose 'k' elements from a set of
    'n' elements. In this case both arguments are nonnegative
    integers and binomial is computed using an efficient
    algorithm based on prime factorization.

    The other definition is generalization for arbitrary 'n',
    however 'k' must also be nonnegative. This case is very
    useful when evaluating summations.

    For the sake of convenience for negative 'k' this function
    will return zero no matter what valued is the other argument.

    To expand the binomial when n is a symbol, use either
    expand_func() or expand(func=True). The former will keep the
    polynomial in factored form while the latter will expand the
    polynomial itself. See examples for details.

    Examples
    ========

    >>> from sympy import Symbol, Rational, binomial, expand_func
    >>> n = Symbol('n', integer=True, positive=True)

    >>> binomial(15, 8)
    6435

    >>> binomial(n, -1)
    0

    Rows of Pascal's triangle can be generated with the binomial function:

    >>> for N in range(8):
    ...     print([ binomial(N, i) for i in range(N + 1)])
    ...
    [1]
    [1, 1]
    [1, 2, 1]
    [1, 3, 3, 1]
    [1, 4, 6, 4, 1]
    [1, 5, 10, 10, 5, 1]
    [1, 6, 15, 20, 15, 6, 1]
    [1, 7, 21, 35, 35, 21, 7, 1]

    As can a given diagonal, e.g. the 4th diagonal:

    >>> N = -4
    >>> [ binomial(N, i) for i in range(1 - N)]
    [1, -4, 10, -20, 35]

    >>> binomial(Rational(5, 4), 3)
    -5/128
    >>> binomial(Rational(-5, 4), 3)
    -195/128

    >>> binomial(n, 3)
    binomial(n, 3)

    >>> binomial(n, 3).expand(func=True)
    n**3/6 - n**2/2 + n/3

    >>> expand_func(binomial(n, 3))
    n*(n - 2)*(n - 1)/6

     fdiff N/A N/A self argindex N/A 1 N/A sympy polygamma N/A N/A argindex 1 N/A N/A N/A n k N/A self args N/A N/A N/A binomial n k N/A N/A polygamma 0 N/A n 1 N/A polygamma 0 N/A N/A n k 1 N/A N/A N/A argindex 2 N/A N/A N/A n k N/A self args N/A N/A N/A binomial n k N/A N/A polygamma 0 N/A N/A n k 1 N/A polygamma 0 N/A k 1 N/A N/A N/A ArgumentIndexError self argindex N/A _eval N/A N/A self n k N/A N/A N/A N/A k is_Integer N/A N/A N/A N/A n is_Integer N/A n 0 N/A N/A N/A n k N/A N/A int n N/A int k N/A N/A k n N/A N/A N/A S Zero N/A N/A N/A k N/A n 2 N/A N/A k N/A n k N/A N/A M result N/A N/A int N/A _sqrt n 1 N/A prime N/A N/A sieve primerange 2 N/A n 1 N/A N/A N/A prime N/A n k N/A N/A result prime N/A N/A N/A prime N/A n 2 N/A N/A N/A N/A N/A prime M N/A N/A N/A N/A n prime N/A k prime N/A N/A result prime N/A N/A N/A N K N/A n k N/A exp a 0 N/A N/A N 0 N/A N/A a N/A int N/A N/A N prime N/A N/A K prime a N/A N/A N K N/A N/A N prime N/A K prime N/A exp N/A a exp N/A N/A exp 0 N/A N/A result N/A prime exp N/A N/A Integer result N/A N/A d result N/A N/A n k 1 N/A i N/A range 2 N/A k 1 N/A N/A d 1 N/A result d N/A result i N/A result N/A classmethod eval N/A N/A cls n k N/A N/A N/A N/A n k N/A map sympify N/A n k N/A d N/A n k N/A N/A N/A d is_zero N/A k is_zero N/A N/A N/A S One N/A N/A N/A N/A d is_zero False N/A N/A N/A N/A k 1 is_zero N/A N/A n N/A N/A N/A k is_negative N/A N/A N/A S Zero N/A N/A N/A N/A n is_integer N/A n is_nonnegative N/A d is_negative N/A N/A N/A S Zero N/A N/A N/A k is_Integer N/A k 0 N/A n is_Number N/A N/A N/A N/A cls _eval n k N/A classmethod _eval_expand_func N/A N/A self N/A hints N/A N/A 
        Function to expand binomial(n,k) when m is positive integer
        Also,
        n is self.args[0] and k is self.args[1] while using binomial(n, k)
         N/A n N/A N/A self args N/A 0 N/A N/A n is_Number N/A N/A N/A binomial N/A self args N/A k N/A N/A self args N/A 1 N/A N/A N/A k is_Add N/A n N/A k args N/A N/A k N/A n k N/A N/A k is_Integer N/A N/A N/A k N/A S Zero N/A N/A N/A S One N/A N/A N/A k 0 N/A N/A N/A S Zero N/A N/A n N/A N/A self args N/A 0 N/A result N/A N/A n k 1 N/A i N/A range 2 N/A k 1 N/A N/A result N/A N/A n k i N/A result i N/A result N/A N/A N/A binomial N/A self args N/A _eval_rewrite_as_factorial N/A N/A self n k N/A N/A N/A N/A N/A factorial n N/A N/A factorial k N/A factorial N/A n k N/A _eval_rewrite_as_gamma N/A N/A self n k N/A N/A sympy gamma N/A N/A N/A gamma N/A n 1 N/A N/A gamma N/A k 1 N/A gamma N/A N/A n k 1 N/A _eval_rewrite_as_tractable N/A N/A self n k N/A N/A N/A N/A N/A N/A N/A self _eval_rewrite_as_gamma n k rewrite tractable N/A _eval_rewrite_as_FallingFactorial N/A N/A self n k N/A N/A N/A N/A k is_integer N/A N/A N/A N/A ff n k N/A factorial k N/A _eval_is_integer N/A N/A self N/A N/A N/A N/A n k N/A self args N/A N/A N/A n is_integer N/A k is_integer N/A N/A True N/A N/A N/A N/A k is_integer False N/A N/A False N/A N/A