Skip to main content

A project to allow overloading functions and methods based of the type hints

Project description

overload

this allows for overloads based upon type hints amongst other things

#just use @overload
@overload
def a()->None:
	"""this one prints 1st and returns none"""
	print("1st")
@overload
def a(a):print("2nd")
@overload
def a(a,b,*args):print("3rd")

a() # prints 1st
a(0) # prints 2nd
a(a=0) # prints 2nd
a(0,1,2,3,4,5) # prints 3rd

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hint_overload-0.0.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

hint_overload-0.0.0-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page