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.7.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

type_constraint-0.0.7-py2.7.egg (4.7 kB view hashes)

Uploaded Source

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