No, it's that you can combine the key and type in __getitem__ but __iter__ has to filter the entire parent map.

> On May 20, 2014, at 5:44 PM, Brett Hazen <notifications@github.com> wrote:
> 
> In riak/datatypes/map.py:
> 
> > +    Implements a sort of view over a Map, filtered by the embedded
> > +    datatype.
> > +    """
> > +
> > +    def __init__(self, parent, datatype):
> > +        self.map = parent
> > +        self.datatype = datatype
> > +
> > +    # Mapping API
> > +    def __getitem__(self, key):
> > +        return self.map[(key, self.datatype)]
> > +
> > +    def __iter__(self):
> > +        for key in self.map.value:
> > +            name, datatype = key
> > +            if datatype == self.datatype:
> Why are we checking the datatype in __iter__, but not in __getitem__? Could the wrong datatype be in the map?
> 
> —
> Reply to this email directly or view it on GitHub.