Example #1
0
def reintroduce_field_value(asker, update, input, output, field, value):
    new_value = asker.ask(translate_field(field, value, update, input, output))
    if new_value.has_answer():
        return asker.reply(answer=held_update(
            apply_to_field(
                fields.modifier(),
                set_field(fields.implication_about(field),new_value.answer)
            ),
            output
        ))
    else:
        return output
Example #2
0
def setter_stripper(asker, property, object, field, new_value):
    if booleans.ask_firmly(asker, builtins.equal(field, fields.modifier())):
        return asker.reply(value=keep_strip(keep=property))
Example #3
0
def application_stripper(asker, property, object, update, field):
    if booleans.ask_firmly(asker, builtins.equal(field, fields.modifier())):
        return asker.reply(value=keep_strip(keep=property))
 def easy_check(asker, object):
     #FIXME seems pretty awkward
     import fields
     m = fields.get(asker, fields.modifier(), object)
     return asker.reply(answer=custom_checker.dispatch(asker, m))