Beispiel #1
0
 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")
Beispiel #2
0
 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')
Beispiel #3
0
 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')
Beispiel #4
0
 def name(self, value):
     """Set `name` and `identifier`."""
     set_property(self, 'name', value)
     clear_property(self, 'id_or_expr')
     clear_property(self, 'identifier')
Beispiel #5
0
 def expression(self, value):
     """Set `expression` and clear `objects`."""
     set_property(self, 'expression', value)
     clear_property(self, 'id_or_expr')
     clear_property(self, 'objects')