Skip to main content

a type constraint tool for python function

Project description

from type_constraint import BasicCheck, CheckMeta, Check

class A:
__metaclass__ = CheckMeta()
def f(self, i, j):
"""
@param i str
@param j str
"""
return i + j

a = A()
a.f('1', '2')

@BasicCheck
def test_func(i, j):
"""
this is a test function for type constraint
@param i int :this is the first operand
@param j float :this is the second operand
@return float
"""
return i / j

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

type_constraint-0.0.10.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

type_constraint-0.0.10-py2.7.egg (4.7 kB view details)

Uploaded Source

File details

Details for the file type_constraint-0.0.10.tar.gz.

File metadata

File hashes

Hashes for type_constraint-0.0.10.tar.gz
Algorithm Hash digest
SHA256 933f5a8ddde6f24463407f342292c243e4762a1953f9b098cb878ecf1e185775
MD5 9f9eea1e0c25b6ebf0b2beb26ed932c1
BLAKE2b-256 94f4bae034a3321852bdf066bb86513e7b03edc6a3cb9266ec0d21be31b95c43

See more details on using hashes here.

File details

Details for the file type_constraint-0.0.10-py2.7.egg.

File metadata

File hashes

Hashes for type_constraint-0.0.10-py2.7.egg
Algorithm Hash digest
SHA256 a0d1f82be2918b7d39b139d6dc75175b3207e74567da74b9229ad2a873973de5
MD5 487c8bec38c8980ce0b5c36f1c9c1496
BLAKE2b-256 76bc5113e34d8ec75a55d7d6cecab75f69b944d8a854b5b941a45e1650a53b35

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