extends
A simple Python library that adds a decorator which helps extend functionality of classes by new methods without inheriting them
Example
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)
Metadata
Release files for extends 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| extends-0.3.0.tar.gz | 2.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| extends-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.9 kB
Release files / extends-0.3.0.tar.gz
| Download URL | extends-0.3.0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b7a5bd1476b0ef1c541decc1b90407e9315548eb11c8aea987eba69d123b5cc
|
|
BLAKE2b-256 checksum How to use checksums |
d9f80203dd66cd49021e7817c01977290e87314bf42ebcc1507cff2c076fef01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.2 CPython/3.8.0 Windows/10
|
Release files / extends-0.3.0-py3-none-any.whl
| Download URL | extends-0.3.0-py3-none-any.whl |
|---|---|
| Size | 2.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b98319e21217d128c1ec4a935579c0cde429f2de7774bafdbc528b3d01314f29
|
|
BLAKE2b-256 checksum How to use checksums |
91a8ee3b075a3cde69bd55f7679641d668321af669842f767c6092e4ddf14335
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.2 CPython/3.8.0 Windows/10
|