def _get_iter(self, _slice, key, get_if_not_present=False): if key.__class__ not in (tuple, list): key = (key, ) return _IndexedComponent_slice_iter( _slice, _fill_in_known_wildcards(flatten_tuple(key), get_if_not_present=get_if_not_present))
def _get_iter(self, _slice, key): if key.__class__ not in (tuple, list): key = (key, ) return _IndexedComponent_slice_iter(_slice, _fill_in_known_wildcards( flatten_tuple(key), look_in_index=True), iter_over_index=True)
def _get_iter(self, _slice, key, get_if_not_present=False): if key.__class__ not in (tuple, list): key = (key,) return _IndexedComponent_slice_iter( _slice, _fill_in_known_wildcards(flatten_tuple(key), get_if_not_present=get_if_not_present) )
def _get_iter(self, _slice, key): if key.__class__ not in (tuple, list): key = (key,) return _IndexedComponent_slice_iter( _slice, _fill_in_known_wildcards(flatten_tuple(key), look_in_index=True), iter_over_index=True )
def _get_iter(self, _slice, key, get_if_not_present=False): # Construct a slice iter with `_fill_in_known_wildcards` # as `advance_iter`. This reuses all the logic from the slice # iter to walk the call/iter stacks, but just jumps to a # particular component rather than actually iterating. # This is how this object does lookups. if key.__class__ not in (tuple, list): key = (key, ) return _IndexedComponent_slice_iter( _slice, _fill_in_known_wildcards(flatten_tuple(key), get_if_not_present=get_if_not_present))