diff options
author | 2022-11-14 16:43:12 +0530 | |
---|---|---|
committer | 2022-11-14 16:43:12 +0530 | |
commit | d47f8b48935d258f4c5c3e2267911753bebd5214 (patch) | |
tree | 3ed04e75bc3fc7c8e4ce618f527565da1df630a1 /env/lib/python3.10/site-packages/setuptools/_distutils/_functools.py | |
parent | 9468226a9e2e2ab8cdd599f1d8538e860ca86120 (diff) | |
download | idcard-d47f8b48935d258f4c5c3e2267911753bebd5214.tar.gz idcard-d47f8b48935d258f4c5c3e2267911753bebd5214.tar.bz2 idcard-d47f8b48935d258f4c5c3e2267911753bebd5214.zip |
id card
Diffstat (limited to 'env/lib/python3.10/site-packages/setuptools/_distutils/_functools.py')
-rw-r--r-- | env/lib/python3.10/site-packages/setuptools/_distutils/_functools.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/env/lib/python3.10/site-packages/setuptools/_distutils/_functools.py b/env/lib/python3.10/site-packages/setuptools/_distutils/_functools.py deleted file mode 100644 index e7053ba..0000000 --- a/env/lib/python3.10/site-packages/setuptools/_distutils/_functools.py +++ /dev/null @@ -1,20 +0,0 @@ -import functools - - -# from jaraco.functools 3.5 -def pass_none(func): - """ - Wrap func so it's not called if its first param is None - - >>> print_text = pass_none(print) - >>> print_text('text') - text - >>> print_text(None) - """ - - @functools.wraps(func) - def wrapper(param, *args, **kwargs): - if param is not None: - return func(param, *args, **kwargs) - - return wrapper |