Skip to content

Commit

Permalink
feat: add default value for the 'silent' func
Browse files Browse the repository at this point in the history
  • Loading branch information
chenghao028935 committed Jan 18, 2024
1 parent 485e526 commit a8480dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions funcy/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def wrapper(*args, **kwargs):
return wrapper
return decorator

def silent(func):
def silent(func, default=None):
"""Alters function to ignore all exceptions."""
return ignore(Exception)(func)
return ignore(Exception, default)(func)


### Backport of Python 3.7 nullcontext
Expand Down

0 comments on commit a8480dc

Please sign in to comment.