extends-0.3.0
توضیحات
A simple Python library that adds a decorator which helps extend functionality of classes by new methods without inheriting them
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | extends-0.3.0 |
| نام | extends |
| نسخه کتابخانه | 0.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Arthur Hakimov |
| ایمیل نویسنده | verybigfolder@yandex.ru |
| آدرس صفحه اصلی | https://github.com/mefolder/extends |
| آدرس اینترنتی | https://pypi.org/project/extends/ |
| مجوز | BSD-3-Clause |
# extends
A simple Python library that adds a decorator which helps extend functionality of classes by new methods without inheriting them
# Example
```python3
from dataclasses import dataclass
from typing import List
from extends import extends
@dataclass
class Student:
name: str
marks: List[int]
@extends(Student)
def avg(self: Student) -> float:
return sum(self.marks) / len(self.marks)
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.5,<4.0 | Python |
نحوه نصب
نصب پکیج whl extends-0.3.0:
pip install extends-0.3.0.whl
نصب پکیج tar.gz extends-0.3.0:
pip install extends-0.3.0.tar.gz