def _scalar_property(fieldname):
    def _getter(self):
        """Scalar property getter."""
        return self._properties.get(fieldname)

    def _setter(self, value):
        """Scalar property setter."""
        self._patch_property(fieldname, value)

    return property(_getter, _setter)
Create a property descriptor around the :class:`_PropertyMixin` helpers.
dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/storage/_helpers.py/_scalar_property