default_value_for_each_call-0.6
توضیحات
compute function default value for each call
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | default_value_for_each_call-0.6 |
| نام | default_value_for_each_call |
| نسخه کتابخانه | 0.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Chen Fengyuan |
| ایمیل نویسنده | jeova.sanctus.unus@gmail.com |
| آدرس صفحه اصلی | UNKNOWN |
| آدرس اینترنتی | https://pypi.org/project/default_value_for_each_call/ |
| مجوز | BSD |
Return a function whose default values will be computed for each call,
instead of evaluating the default values when function definition is executed.
make sure this function is the last(closest to the function) decorator
Usage:
@default_value_for_each_call.compute_default_value_for_each_call
def foo(a=([])):
a.append(3)
print a
foo()
foo()
Output:
[3]
[3]
نحوه نصب
نصب پکیج whl default_value_for_each_call-0.6:
pip install default_value_for_each_call-0.6.whl
نصب پکیج tar.gz default_value_for_each_call-0.6:
pip install default_value_for_each_call-0.6.tar.gz