def directory(self, value): """Normalize the value of :attr:`directory` when it's set.""" # Normalize the value of `directory'. set_property(self, "directory", parse_path(value)) # Clear the computed values of `context' and `entries'. clear_property(self, "context") clear_property(self, "entries")
def destination(self, value): """Automatically coerce strings to :class:`.Destination` objects.""" if not isinstance(value, Destination): value = Destination(expression=value) set_property(self, 'destination', value) clear_property(self, 'destination_context')
def objects(self, value): """Set `objects` and clear `expression`.""" set_property(self, 'objects', set(value)) clear_property(self, 'id_or_expr') clear_property(self, 'expression')
def name(self, value): """Set `name` and `identifier`.""" set_property(self, 'name', value) clear_property(self, 'id_or_expr') clear_property(self, 'identifier')
def expression(self, value): """Set `expression` and clear `objects`.""" set_property(self, 'expression', value) clear_property(self, 'id_or_expr') clear_property(self, 'objects')