def get_field(self, key, default=None):
    return self._fields.get(key, default)
An alternative to attribute access for duck typing Payload instances.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/base/payload.py/Payload.get_field