Holo is a library provides overload like cpp
Project description
holo
Holo is a library provides overload like cpp
Installation
pip install holo
A Simple Example
from holo import overload
@overload
def add(l, r):
return l + r
@overload
def add(l):
return l + 2
add(3)
#>5
add(3, 4)
#>7
class Foo:
def __init__(self, l):
self.l = l
@overload
def add(self):
return self.l + 2
@overload
def add(self, r):
return self.l + r
f = Foo(3)
f.add()
#>5
f.add(4)
#>7
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
holo-0.1.3.tar.gz
(2.4 kB
view details)
Built Distribution
holo-0.1.3-py3-none-any.whl
(2.6 kB
view details)
File details
Details for the file holo-0.1.3.tar.gz
.
File metadata
- Download URL: holo-0.1.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.0 Darwin/19.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fa568b1435ae34ff29476b8c34c2a08ebdf2e612b75e976647a0f1bcac36837 |
|
MD5 | 2b6bb2e6e1cb5c9de4ca0aa341d45385 |
|
BLAKE2b-256 | 9c98d38fc86b1358d4dae172ccf356bb3051f9812bedf8f1e67dcfe4f26d40f1 |
File details
Details for the file holo-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: holo-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.0 Darwin/19.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5402564baf1f357a997d7c8a5d4a0f38dc9f83d823b900ae08864190acce397 |
|
MD5 | d5be2eac643d34f505b487c489444404 |
|
BLAKE2b-256 | 0b22b79488c48ee89b3a7a58a016dfa8c7c0eb7ad689667e7d898e552b1aa2d1 |