Metadata-Version: 1.1
Name: typecheck3
Version: 0.1.0
Summary: A Python 3 easy to use runtime typechecker
Home-page: http://code.activestate.com/recipes/572161/
Author: Dmitry Dvoinikov
Author-email: dmitry@targeted.org
License: MIT
Description: typecheck3
        ===
        
        An easy-to-use Python 3 runtime typechecker.
        
        Usage
        ---
        
        The typical usage for this decorator would be something like this:
        
            @typecheck
            def foo(i: int) -> bool:
                return a > 0
        
            @typecheck
            def to_int(*, s: by_regex("^[0-9]+$")) -> int:
                return int(s)
        
            @typecheck
            def set_debug_level(self, level: optional(one_of(1, 2, 3)) = 2):
                self._level = level
        
        This recipe is extensible with callable predicates, such as
        
            is_even = lambda x: x % 2 == 0
        
            @typecheck
            def multiply_by_2(i: int) -> is_even:
                return i * 2
        
        Credits
        ---
        
        The code was written by Dmitri Dvoinikov and maintained by Esteban Ordano
        (@eordano on twitter).
        
        Original link:
        
        http://code.activestate.com/recipes/572161/
        
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
