Skip to content
/ holo Public

Holo is a library provides overload like cpp

License

Notifications You must be signed in to change notification settings

Na0ture/holo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Holo is a library provides overload like cpp

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages