Metadata-Version: 1.1
Name: dataholder
Version: 1.0.1
Summary: Trick for assignment in an if statement
Home-page: https://github.com/pitcons/dataholder
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Description: dataholder
        ======
        
        This is a trick for assignment in an if statement.
        
        Install
        -------
        .. code-block:: sh
        
            pip install dataholder
        
        Usage
        -----
        
        .. code-block:: python
        
            import re
            from dataholder import DataHolder
        
            input = u'test bar 123'
            save_match = DataHolder(attr_name='match')
            if save_match(re.search('foo (\d+)', input)):
                print "Foo"
                print save_match.match.group(1)
            elif save_match(re.search('bar (\d+)', input)):
                print "Bar"
                print save_match.match.group(1)
            elif save_match(re.search('baz (\d+)', input)):
                print "Baz"
                print save_match.match.group(1)
        
        
        The code was taken from http://stackoverflow.com/a/1806338/1849904
        
        The author of idea is Alex Martelli
        
Keywords: python
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
