dunderdecorators-1.0.0
توضیحات
Python decorator library that adds customizeable dunder methods to decorated classes.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dunderdecorators-1.0.0 |
| نام | dunderdecorators |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Andy Stokely |
| ایمیل نویسنده | amstokely@ucsd.edu |
| آدرس صفحه اصلی | https://github.com/astokely/dunderdecorators |
| آدرس اینترنتی | https://pypi.org/project/dunderdecorators/ |
| مجوز | MIT |
By Andy Stokely
Python decorator library that adds customizeable dunder methods to
decorated classes. This both decreases the amount of code that is
normally required to implement dunder methods, and also helps
reduce repitition when coding classes that use custom dunder
methods with the same or similar code. Right now, the following
dunder methods have corresponding dunder decorators:
__iter__ (dunder_iter)
__setitem__ (dunder_setitem)
__getitem__ (dunder_getitem)
__missing__ (dunder_missing)
__repr__ (dunder_repr)
If a dunder decorator is used without any parameters,
it defines the special method with respect to the class
object's dictionary. However, the user is able to have the
special method defined with repsect to one of the class
object's attributes by setting the attr parameter equal
to the name of the attribute. Dunder decorators can also
be used with classes that use __slots__, rather then a
dictionary to store object attributes, by setting the
slots parameter to True. For specific examples,
see the examples in the dunder_decorator.py doc-strings.
نیازمندی
| مقدار | نام |
|---|---|
| - | typing |
| - | pytest |
| - | cython |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl dunderdecorators-1.0.0:
pip install dunderdecorators-1.0.0.whl
نصب پکیج tar.gz dunderdecorators-1.0.0:
pip install dunderdecorators-1.0.0.tar.gz