~ubuntuone-pqm-team/python-oath/master

« back to all changes in this revision

Viewing changes to oath/_utils.py

  • Committer: Benjamin Dauvergne
  • Date: 2015-06-16 09:59:40 UTC
  • Revision ID: git-v1:761bb17b0e1c26db62cb54c95ce0dac86309fdc4
use all() instead of reduce(operator.__and__, ...)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        raise TypeError
33
33
    if len(a) != len(b):
34
34
        return False
35
 
    return reduce(bool.__and__, map(lambda x: x[0] == x[1], zip(a, b)))
 
35
    return all(map(lambda x: x[0] == x[1], zip(a, b)))
36
36