(field_name, docstring)
return property(getter, doc=docstring)
Create a GridOut property.
Create a GridOut property.
Create a GridOut property .
def _grid_out_property(field_name, docstring):
    """Create a GridOut property."""
    def getter(self):
        self._ensure_file()

        # Protect against PHP-237
        if field_name == 'length':
            return self._file.get(field_name, 0)
        return self._file.get(field_name, None)

    docstring += "\n\nThis attribute is read-only."
    return property(getter, doc=docstring)
def _grid_out_property ( field_name , docstring ) : def getter ( self ) : self . _ensure_file ( ) # Protect against PHP-237 if field_name == 'length' : return self . _file . get ( field_name , 0 ) return self . _file . get ( field_name , None ) docstring += "\n\nThis attribute is read-only." return property ( getter , doc = docstring )