@@ -61,7 +61,9 @@ def _execute_default_mode(mod):
61
61
62
62
63
63
@modifier_directive ("variable_modifications" )
64
- def variable_modification (name , modification , method = "set" , mode = None , modes = None , ** kwargs ):
64
+ def variable_modification (
65
+ name , modification , method = "set" , mode = None , modes = None , separator = " " , ** kwargs
66
+ ):
65
67
"""Define a new variable modification for a mode in this modifier.
66
68
67
69
A variable modification will apply a change to a defined variable within an experiment.
@@ -72,6 +74,8 @@ def variable_modification(name, modification, method="set", mode=None, modes=Non
72
74
method (str): How the modification should be applied
73
75
mode (str): Single mode to group this modification into
74
76
modes (str): List of modes to group this modification into
77
+ separator (str): Optional separator to use when modifying with 'append' or
78
+ 'prepend' methods.
75
79
76
80
Supported values are 'append', 'prepend', and 'set':
77
81
'append' will add the modification to the end of 'name'
@@ -98,6 +102,7 @@ def _execute_variable_modification(mod):
98
102
mod .variable_modifications [mode_name ][name ] = {
99
103
"modification" : modification ,
100
104
"method" : method ,
105
+ "separator" : separator ,
101
106
}
102
107
103
108
return _execute_variable_modification
0 commit comments