

def __getitem__(self, key):
    field = self.fields[key]
    value = (field.value.get(key) if self.value else None)
    error = (self.errors.get(key) if self.errors else None)
    if hasattr(field, 'fields'):
        return NestedBoundField(field, value, error, prefix=(self.name + '.'))
    return BoundField(field, value, error, prefix=(self.name + '.'))

dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/utils/serializer_helpers.py NestedBoundField.__getitem__/VarMisuse@24/26 `self`->`field`