Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    087e497a
    Replace reduce(operator.or_, ...) with any(...). · 087e497a
    Nat Goodspeed authored
    The any() builtin was introduced in Python 2.5. Not only is its intent
    clearer, but it handles the case of zero items -- which the reduce(or_)
    construct does not. Sporadically we've seen exceptions from
    generate_breakpad_symbols.py when reduce(or_, ...) is given zero items. This
    masks the actual error (failure to dump symbols? failure to read them?),
    masquerading as a bug in the Python script.
    087e497a
    History
    Replace reduce(operator.or_, ...) with any(...).
    Nat Goodspeed authored
    The any() builtin was introduced in Python 2.5. Not only is its intent
    clearer, but it handles the case of zero items -- which the reduce(or_)
    construct does not. Sporadically we've seen exceptions from
    generate_breakpad_symbols.py when reduce(or_, ...) is given zero items. This
    masks the actual error (failure to dump symbols? failure to read them?),
    masquerading as a bug in the Python script.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.