Metadata-Version: 2.1
Name: accepts
Version: 2020.12.3
Summary: @accepts decorator to check arguments types
Home-page: https://github.com/andrewp-as-is/accepts.py
License: Unlicense
Description: <!--
        https://readme42.com
        -->
        
        
        [![](https://img.shields.io/pypi/v/accepts.svg?maxAge=3600)](https://pypi.org/project/accepts/)
        [![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)
        
        ### Installation
        ```bash
        $ [sudo] pip install accepts
        ```
        
        #### Features
        *	support **multiple types** argument
        *	support **None** argument
        *	human readable detailed exception message
        
        #### Examples
        ```python
        >>> from accepts import accepts
        >>> @accepts(int)
        def inc(value):
        	return value+1
        
        >>> inc(1) # ok
        
        # multiple types
        >>> @accepts((int,float))
        >>> inc(1.5) # ok
        >>> inc("string")
        TypeError: inc() argument #0 is not instance of (<class 'int'>, <class 'float'>)
        
        # None
        >>> @accepts((int,float,type(None)))
        ```
        
        <p align="center">
            <a href="https://readme42.com/">readme42.com</a>
        </p>
Keywords: type decorator
Platform: UNKNOWN
Classifier: License :: Public Domain
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
