Module Import alias Import alias Import alias Import alias Assign NameStore Call NameLoad Str Assign NameStore TupleLoad NameLoad UnaryOpUSub NameLoad FunctionDef arguments args NameParam NameParam defaults Num body Expr Str ImportFrom alias Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad BinOpAdd NameLoad Num keyword Num decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assert CompareGtE NameLoad Num If CompareEq NameLoad Num body Return Num orelse If CompareLt NameLoad Num body Return Call NameLoad NameLoad orelse If CompareEq NameLoad Num body Return Num orelse Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr Num body AugAssignMult NameStore NameLoad If CompareEq NameLoad NameLoad body Return NameLoad orelse If CompareGt NameLoad NameLoad body Return IfExp NameLoad NameLoad BinOpSub NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Assert Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad body Assert CompareLtELtE Num NameLoad NameLoad AugAssignAdd NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assert Call NameLoad NameLoad AttributeLoad NameLoad attr Assert CompareGtE NameLoad Num Assert Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call NameLoad NameLoad keyword NameLoad Num Assign NameStore BinOpMult ListLoad NameLoad NameLoad Assign NameStore NameLoad For NameStore SubscriptLoad Call NameLoad NameLoad Slice Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore SubscriptStore NameLoad Index BinOpSub BinOpSub NameLoad NameLoad Num NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareLt Call NameLoad NameLoad NameLoad body Return BinOpAdd BinOpMult TupleLoad Num BinOpSub NameLoad Call NameLoad NameLoad NameLoad orelse Return NameLoad decorator_list
N/A N/A math N/A collections N/A itertools N/A numbers N/A infinity N/A float inf N/A infinities N/A infinity N/A infinity factorial N/A N/A x start N/A 1 N/A N/A 
    Calculate a factorial.
    
    This differs from the built-in `math.factorial` in that it allows a `start`
    argument. If one is given, the function returns `(x!)/(start!)`.
    
    Examples:
    
        >>> factorial(5)
        120
        >>> factorial(5, 3)
        60

     combi._python_toolbox misc_tools N/A N/A N/A misc_tools general_product N/A range start N/A x 1 start 1 N/A inverse_factorial N/A N/A number round_up N/A True N/A N/A 
    Get the integer that the factorial of would be `number`.
    
    If `number` isn't a factorial of an integer, the result will be rounded. By
    default it'll be rounded up, but you can specify `round_up=False` to have
    it be rounded down.
    
    Examples:
    
        >>> inverse_factorial(100)
        5
        >>> inverse_factorial(100, round_up=False)
        4
        
     N/A N/A number 0 N/A N/A number 0 N/A N/A 0 N/A N/A N/A number 1 N/A N/A N/A int round_up N/A N/A N/A number 1 N/A N/A 1 N/A N/A current_number 1 N/A multiplier N/A N/A itertools count 2 N/A N/A current_number multiplier N/A N/A current_number number N/A N/A multiplier N/A N/A N/A current_number number N/A N/A N/A round_up multiplier N/A multiplier 1 N/A from_factoradic N/A N/A factoradic_number N/A N/A N/A 
    Convert a factoradic representation to the number it's representing.
    
    Read about factoradic numbers here:
    https://en.wikipedia.org/wiki/Factorial_number_system
    
    Example:
    
        >>> from_factoradic((4, 0, 2, 0, 0))
        100
    
     combi._python_toolbox sequence_tools N/A N/A isinstance factoradic_number N/A collections Iterable N/A factoradic_number N/A N/A sequence_tools ensure_iterable_is_sequence factoradic_number N/A number 0 N/A N/A i value N/A enumerate N/A reversed factoradic_number N/A N/A N/A 0 value i N/A number N/A value N/A N/A math factorial i N/A number N/A to_factoradic N/A N/A number n_digits_pad N/A 0 N/A N/A 
    Convert a number to factoradic representation (in a tuple.)
    
    Read about factoradic numbers here:
    https://en.wikipedia.org/wiki/Factorial_number_system
    
    Example:
    
        >>> to_factoradic(100)
        (4, 0, 2, 0, 0)
        
    
    Use `n_digits_pad` if you want to have the result padded with zeroes:
    
        >>> to_factoradic(100, n_digits_pad=7)
        (0, 0, 4, 0, 2, 0, 0)
        
     N/A N/A isinstance number N/A numbers Integral N/A N/A number 0 N/A N/A isinstance n_digits_pad N/A numbers Integral N/A n_digits N/A N/A inverse_factorial number round_up False 1 N/A digits N/A N/A None n_digits N/A current_number number N/A i N/A N/A range n_digits N/A -1 N/A N/A unit N/A N/A math factorial i N/A N/A N/A digits N/A N/A N/A n_digits i 1 current_number N/A divmod current_number unit N/A result N/A tuple digits N/A N/A N/A len result n_digits_pad N/A N/A N/A N/A N/A 0 N/A n_digits_pad N/A len result result N/A N/A result N/A