Skip to main content

Set limited type instances and overload functions like Java in python

Project description

InstanceTuner

Set limited type instances and overload functions like Java in python

you can install it by:

pip install instanceTuner    

Do you want to be able overload every function and method, even constructors (init) like Java in python?

Do you want to never write 'raise' or 'assert' in your python code when it comes to function arguments?

from instanceTuner.set import setFunction

class Test:
    @setFunction
    def __init__(self, a: int, b) -> None:
        pass

    @setFunction
    def __init__(self, a: int, b: str) -> None:
        pass

This package will raise error for you if 'a' does'nt get integer value

with checking types by using 'setFunction' we are able to distinguish signatures of functions from each other like java compiler and using it for overload purposes

if you pass some object for 'b' which is'nt str, first init would executed

even the return value can raise an error. but it does'nt have any use for overload due.for example :

@setFunction
def test() -> None:
    return 0

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

instanceTuner-1.6.2.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

instanceTuner-1.6.2-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file instanceTuner-1.6.2.tar.gz.

File metadata

  • Download URL: instanceTuner-1.6.2.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.3

File hashes

Hashes for instanceTuner-1.6.2.tar.gz
Algorithm Hash digest
SHA256 4fbf32526564076d336cf1c242b151a0484f60771659efc7b90fc149a9f74400
MD5 8ff4bb267c9bed2bedf12cb03f5ee456
BLAKE2b-256 1da9e87799fecb882d8d777b1373f33ad365507acacd0b178884c3ea95b0a7d6

See more details on using hashes here.

File details

Details for the file instanceTuner-1.6.2-py3-none-any.whl.

File metadata

  • Download URL: instanceTuner-1.6.2-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.3

File hashes

Hashes for instanceTuner-1.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9eed1477d17614e70c58ba55a07a64ce96aa655457b539b94571357465efb01a
MD5 3e9567534c2274b6aa596db404cbb391
BLAKE2b-256 8875dc0300f6825c5d95fc10b4d248ce9a5279d5f86f52b57c56fa582036e9ce

See more details on using hashes here.

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