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 hashes)
Built Distribution
holo-0.1.3-py3-none-any.whl
(2.6 kB
view hashes)