Пример #1
0
    def check_constraint(fn, constraint):
        c_key = tuple(
            takewhile(lambda x: x is not None, constraint_key(constraint)))

        def inner(version):
            return fn(constraint_key(version)[:len(c_key)], c_key)

        return inner
Пример #2
0
 def inner(version):
     return fn(
         constraint_key(version)[:len(c_key)],
         c_key
     )