Module Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Str ClassDef bases AttributeLoad NameLoad attr body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert BoolOpOr Call NameLoad NameLoad NameLoad CompareEq NameLoad NameLoad If CompareGtE NameLoad Num body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore SubscriptLoad NameLoad Index Num With AttributeLoad NameLoad attr body Return Call NameLoad NameLoad NameLoad decorator_list AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr UnaryOpNot Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr IfExp NameLoad NameLoad NameLoad Expr Str Assign AttributeStore NameLoad attr IfExp NameLoad NameLoad ListLoad Expr Str Assign AttributeStore NameLoad attr IfExp NameLoad NameLoad Call NameLoad NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Return Call NameLoad Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list Return Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str ImportFrom alias If AttributeLoad NameLoad attr body Return orelse If BoolOpOr Call NameLoad NameLoad NameLoad CompareEq NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad orelse Assert Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr Num body AugAssignSub NameStore Num While CompareLtE Call NameLoad AttributeLoad NameLoad attr NameLoad body TryExcept body With AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr NameLoad Break decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return Num orelse Expr Call AttributeLoad NameLoad attr Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad body If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Return NameLoad If CompareNotEq NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd UnaryOpNot NameLoad NameLoad body Return NameLoad orelse If BoolOpAnd NameLoad UnaryOpNot NameLoad body Return NameLoad orelse If BoolOpAnd UnaryOpNot NameLoad UnaryOpNot NameLoad body Return NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad body If CompareIs NameLoad NameLoad body Return NameLoad orelse If CompareIs NameLoad NameLoad body Assert CompareIsNot NameLoad NameLoad Return NameLoad orelse If CompareEq NameLoad NameLoad body Continue orelse If CompareLt NameLoad NameLoad body Return NameLoad orelse Assert CompareGt NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr ListLoad body Assign NameStore Str orelse Assign NameStore BinOpMod Str Call NameLoad AttributeLoad NameLoad attr Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpAdd Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpAdd Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Raise Call NameLoad Str orelse Expr Call AttributeLoad NameLoad attr Return Call NameLoad Call NameLoad NameLoad decorator_list decorator_list AttributeLoad NameLoad attr
N/A N/A functools N/A threading N/A collections N/A itertools python_toolbox misc_tools python_toolbox decorator_tools python_toolbox comparison_tools N/A infinity N/A float inf _SENTINEL N/A N/A misc_tools NonInstantiable N/A N/A Sentinel used to detect the end of an iterable. N/A _convert_index_to_exhaustion_point N/A N/A index N/A N/A N/A 
    Convert an index to an "exhaustion point".
    
    The index may be either an integer or infinity.
    
    "Exhaustion point" means "until which index do we need to exhaust the
    internal iterator." If an index of `3` was requested, we need to exhaust it
    to index `3`, but if `-7` was requested, we have no choice but to exhaust
    the iterator completely (i.e. to `infinity`, actually the last element,)
    because only then we could know which member is the seventh-to-last.    
     N/A N/A N/A isinstance index int N/A index infinity N/A N/A index 0 N/A N/A index N/A N/A infinity N/A _with_lock N/A N/A method N/A args kwargs N/A N/A Decorator for using the `LazyTuple`'s lock. N/A self N/A args N/A 0 N/A N/A self lock N/A N/A N/A method args kwargs N/A N/A decorator_tools decorator LazyTuple N/A N/A collections Sequence N/A N/A 
    A lazy tuple which requests as few values as possible from its iterator.
    
    Wrap your iterators with `LazyTuple` and enjoy tuple-ish features like
    indexed access, comparisons, length measuring, element counting and more.
    
    Example:
    
        def my_generator():
            yield from ('hello', 'world', 'have', 'fun')
            
        lazy_tuple = LazyTuple(my_generator())
        
        assert lazy_tuple[2] == 'have'
        assert len(lazy_tuple) == 4
    
    `LazyTuple` holds the given iterable and pulls items out of it. It pulls as
    few items as it possibly can. For example, if you ask for the third
    element, it will pull exactly three elements and then return the third one.
    
    Some actions require exhausting the entire iterator. For example, checking
    the `LazyTuple` length, or doing indexex access with a negative index.
    (e.g. asking for the seventh-to-last element.)
    
    If you're passing in an iterator you definitely know to be infinite,
    specify `definitely_infinite=True`.
     __init__ N/A N/A self iterable definitely_infinite N/A False N/A N/A was_given_a_sequence N/A N/A isinstance iterable N/A collections Sequence N/A N/A isinstance iterable LazyTuple N/A N/A self is_exhausted N/A was_given_a_sequence True False N/A Flag saying whether the internal iterator is tobag exhausted. N/A N/A self collected_data N/A was_given_a_sequence iterable N/A N/A All the items that were collected from the iterable. N/A N/A self _iterator N/A was_given_a_sequence None N/A iter iterable N/A The internal iterator from which we get data. N/A N/A self definitely_infinite definitely_infinite N/A 
        The iterator is definitely infinite.
        
        The iterator might still be infinite if this is `False`, but if it's
        `True` then it's definitely infinite.
         N/A N/A self lock N/A N/A threading Lock N/A Lock used while exhausting to make `LazyTuple` thread-safe. N/A factory N/A N/A cls definitely_infinite N/A False N/A N/A 
        Decorator to make generators return a `LazyTuple`.
                
        Example:
        
            @LazyTuple.factory()
            def my_generator():
                yield from ['hello', 'world', 'have', 'fun']
        
        This works on any function that returns an iterator. todo: Make it work
        on iterator classes.
         inner N/A N/A function N/A args kwargs N/A N/A N/A cls N/A function args kwargs definitely_infinite definitely_infinite N/A N/A N/A N/A decorator_tools decorator inner N/A classmethod N/A decorator_tools helpful_decorator_builder known_length N/A N/A self N/A N/A N/A 
        The number of items which have been taken from the internal iterator.
         N/A N/A len N/A self collected_data N/A property exhaust N/A N/A self i N/A infinity N/A N/A 
        Take items from the internal iterators and save them.
        
        This will take enough items so we will have `i` items in total,
        including the items we had before.
         python_toolbox sequence_tools N/A N/A self is_exhausted N/A N/A N/A N/A N/A N/A isinstance i int N/A i infinity N/A N/A exhaustion_point N/A _convert_index_to_exhaustion_point i N/A N/A N/A isinstance i slice N/A canonical_slice N/A N/A sequence_tools CanonicalSlice i N/A exhaustion_point N/A max N/A _convert_index_to_exhaustion_point N/A canonical_slice start N/A _convert_index_to_exhaustion_point N/A canonical_slice stop N/A N/A N/A canonical_slice step 0 N/A N/A exhaustion_point 1 N/A N/A N/A len N/A self collected_data exhaustion_point N/A N/A N/A N/A N/A self lock N/A N/A N/A N/A N/A self collected_data append N/A next N/A self _iterator N/A N/A N/A StopIteration N/A N/A N/A self is_exhausted True N/A N/A __getitem__ N/A N/A self i N/A N/A N/A Get item by index, either an integer index or a slice. N/A N/A N/A self exhaust i N/A result N/A N/A self collected_data N/A i N/A N/A isinstance i slice N/A N/A N/A tuple result N/A N/A result N/A __len__ N/A N/A self N/A N/A N/A N/A self definitely_infinite N/A N/A 0 N/A N/A N/A N/A self exhaust N/A N/A len N/A self collected_data N/A __eq__ N/A N/A self other N/A N/A python_toolbox sequence_tools N/A N/A N/A N/A sequence_tools is_immutable_sequence other N/A N/A False N/A N/A i j N/A N/A itertools zip_longest self other fillvalue _SENTINEL N/A N/A N/A N/A i _SENTINEL N/A j _SENTINEL N/A N/A False N/A N/A i j N/A N/A False N/A True N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A N/A self __eq__ other N/A __bool__ N/A N/A self N/A N/A N/A N/A N/A N/A next N/A iter self N/A N/A N/A StopIteration N/A N/A False N/A N/A True N/A __lt__ N/A N/A self other N/A N/A N/A N/A N/A self other N/A N/A True N/A N/A N/A self N/A other N/A N/A False N/A N/A N/A N/A self N/A other N/A N/A False N/A N/A a b N/A N/A itertools zip_longest self other fillvalue _SENTINEL N/A N/A N/A a _SENTINEL N/A N/A True N/A N/A N/A b _SENTINEL N/A N/A N/A a _SENTINEL N/A False N/A N/A N/A a b N/A N/A N/A N/A N/A a b N/A N/A True N/A N/A N/A a b N/A False N/A __repr__ N/A N/A self N/A N/A N/A 
        Return a human-readeable representation of the `LazyTuple`.
        
        Example:
        
            <LazyTuple: (1, 2, 3, ...)>
            
        The '...' denotes a non-exhausted lazy tuple.
         N/A N/A self is_exhausted N/A N/A inner N/A repr N/A self collected_data N/A N/A N/A N/A self collected_data N/A N/A N/A inner (...) N/A N/A inner N/A %s... N/A repr N/A self collected_data N/A N/A <%s: %s> N/A N/A N/A self __class__ __name__ inner N/A __add__ N/A N/A self other N/A N/A N/A N/A N/A tuple self N/A tuple other N/A __radd__ N/A N/A self other N/A N/A N/A N/A N/A tuple other N/A tuple self N/A __mul__ N/A N/A self other N/A N/A N/A N/A N/A N/A tuple self __mul__ other N/A __rmul__ N/A N/A self other N/A N/A N/A N/A N/A N/A tuple self __rmul__ other N/A __hash__ N/A N/A self N/A N/A N/A 
        Get the `LazyTuple`'s hash.
        
        Note: Hashing the `LazyTuple` will completely exhaust it.
         N/A N/A self definitely_infinite N/A N/A N/A TypeError An infinite `LazyTuple` isn't hashable. N/A N/A N/A N/A self exhaust N/A N/A hash N/A tuple self N/A N/A N/A functools total_ordering