Yes. Lambdas in Python are awkward, but you can definitely use either a lambda or a named function.
In fact, you could define a number of useful precondition functions in a single module and use them throughout a project. A couple of higher-order functions could make the post's examples safer and nicer-looking too. For example:
@precondition(starts_with('The year is '))
where the starts_with precondition is:
def starts_with(param):
def test(s):
return s.startswith(param)
return test
"Decorators for preconditions" look pretty neat as well. It's a little sad that the preconditions themselves have to be written inside strings though.