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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file type_constraint-0.0.10.tar.gz
.
File metadata
- Download URL: type_constraint-0.0.10.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 933f5a8ddde6f24463407f342292c243e4762a1953f9b098cb878ecf1e185775 |
|
MD5 | 9f9eea1e0c25b6ebf0b2beb26ed932c1 |
|
BLAKE2b-256 | 94f4bae034a3321852bdf066bb86513e7b03edc6a3cb9266ec0d21be31b95c43 |
File details
Details for the file type_constraint-0.0.10-py2.7.egg
.
File metadata
- Download URL: type_constraint-0.0.10-py2.7.egg
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0d1f82be2918b7d39b139d6dc75175b3207e74567da74b9229ad2a873973de5 |
|
MD5 | 487c8bec38c8980ce0b5c36f1c9c1496 |
|
BLAKE2b-256 | 76bc5113e34d8ec75a55d7d6cecab75f69b944d8a854b5b941a45e1650a53b35 |