============
iterpop
============
.. image:: https://img.shields.io/pypi/v/iterpop.svg
:target: https://pypi.python.org/pypi/iterpop
.. image:: https://img.shields.io/travis/mmore500/iterpop.svg
:target: https://travis-ci.com/mmore500/iterpop
.. image:: https://readthedocs.org/projects/iterpop/badge/?version=latest
:target: https://iterpop.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
iterpop makes popping the value out of a singleton container or a homogeneous container safe & fun
* Free software: MIT license
* Documentation: https://iterpop.readthedocs.io.
.. code-block:: python3
from iterpop import iterpop as ip
# returns 'a'
ip.popsingleton(['a'])
ip.popsingleton({'a'})
ip.popsingleton('a')
# throws
ip.popsingleton([])
ip.popsingleton(set())
ip.popsingleton('')
# throws
ip.popsingleton(['a', 'b'])
ip.popsingleton({'a', 'b'})
ip.popsingleton('ab'})
# returns 'a'
ip.pophomogeneous(['a'])
ip.pophomogeneous({'a'})
ip.pophomogeneous('a')
# also returns 'a'
ip.pophomogeneous(['a', 'a'])
ip.pophomogeneous('aaa')
ip.pophomogeneous('a' for __ in range(100))
# throws
ip.pophomogeneous([])
ip.pophomogeneous(set())
ip.pophomogeneous('')
# throws
ip.pophomogeneous(['a', 'b'])
ip.pophomogeneous({'a', 'b'})
ip.pophomogeneous('ab'})
# returns 'a'
ip.poursingleton(['a'])
ip.poursingleton({'a'})
ip.poursingleton('a')
# returns None
ip.poursingleton([])
ip.poursingleton(set())
ip.poursingleton('')
# throws
ip.poursingleton(['a', 'b'])
ip.poursingleton({'a', 'b'})
ip.poursingleton('ab'})
# returns 'a'
ip.pourhomogeneous(['a'])
ip.pourhomogeneous({'a'})
ip.pourhomogeneous('a')
# also returns 'a'
ip.pourhomogeneous(['a', 'a'])
ip.pourhomogeneous('aaa')
ip.pourhomogeneous('a' for __ in range(100))
# returns None
ip.pourhomogeneous([])
ip.pourhomogeneous(set())
ip.pourhomogeneous('')
# throws
ip.pourhomogeneous(['a', 'b'])
ip.pourhomogeneous({'a', 'b'})
ip.pourhomogeneous('ab'})
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.1.0 (2020-07-06)
------------------
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/mmore500/iterpop",
"name": "iterpop",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "iterpop",
"author": "Matthew Andres Moreno",
"author_email": "m.more500@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/57/72/e4ebfe83d3cd70895e9c3eddd34dad7d01b7484de442d23d5cd66bd4935d/iterpop-0.4.1.tar.gz",
"platform": null,
"description": "============\niterpop\n============\n\n\n.. image:: https://img.shields.io/pypi/v/iterpop.svg\n :target: https://pypi.python.org/pypi/iterpop\n\n.. image:: https://img.shields.io/travis/mmore500/iterpop.svg\n :target: https://travis-ci.com/mmore500/iterpop\n\n.. image:: https://readthedocs.org/projects/iterpop/badge/?version=latest\n :target: https://iterpop.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n\n\niterpop makes popping the value out of a singleton container or a homogeneous container safe & fun\n\n\n* Free software: MIT license\n* Documentation: https://iterpop.readthedocs.io.\n\n\n.. code-block:: python3\n\n from iterpop import iterpop as ip\n\n # returns 'a'\n ip.popsingleton(['a'])\n ip.popsingleton({'a'})\n ip.popsingleton('a')\n\n # throws\n ip.popsingleton([])\n ip.popsingleton(set())\n ip.popsingleton('')\n\n # throws\n ip.popsingleton(['a', 'b'])\n ip.popsingleton({'a', 'b'})\n ip.popsingleton('ab'})\n\n # returns 'a'\n ip.pophomogeneous(['a'])\n ip.pophomogeneous({'a'})\n ip.pophomogeneous('a')\n\n # also returns 'a'\n ip.pophomogeneous(['a', 'a'])\n ip.pophomogeneous('aaa')\n ip.pophomogeneous('a' for __ in range(100))\n\n # throws\n ip.pophomogeneous([])\n ip.pophomogeneous(set())\n ip.pophomogeneous('')\n\n # throws\n ip.pophomogeneous(['a', 'b'])\n ip.pophomogeneous({'a', 'b'})\n ip.pophomogeneous('ab'})\n\n # returns 'a'\n ip.poursingleton(['a'])\n ip.poursingleton({'a'})\n ip.poursingleton('a')\n\n # returns None\n ip.poursingleton([])\n ip.poursingleton(set())\n ip.poursingleton('')\n\n # throws\n ip.poursingleton(['a', 'b'])\n ip.poursingleton({'a', 'b'})\n ip.poursingleton('ab'})\n\n # returns 'a'\n ip.pourhomogeneous(['a'])\n ip.pourhomogeneous({'a'})\n ip.pourhomogeneous('a')\n\n # also returns 'a'\n ip.pourhomogeneous(['a', 'a'])\n ip.pourhomogeneous('aaa')\n ip.pourhomogeneous('a' for __ in range(100))\n\n # returns None\n ip.pourhomogeneous([])\n ip.pourhomogeneous(set())\n ip.pourhomogeneous('')\n\n # throws\n ip.pourhomogeneous(['a', 'b'])\n ip.pourhomogeneous({'a', 'b'})\n ip.pourhomogeneous('ab'})\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.1.0 (2020-07-06)\n------------------\n\n* First release on PyPI.\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "iterpop makes popping the value out of a singleton container safe and fun",
"version": "0.4.1",
"project_urls": {
"Homepage": "https://github.com/mmore500/iterpop"
},
"split_keywords": [
"iterpop"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eca2b7e4fee1bb1749b8c7e27d520dd747fc16c920d0aadf6323324d88cb7a72",
"md5": "c73e75ebca30d4e31171879d4e2f0fc9",
"sha256": "8290df022defb9dda2e3e29a9ae99ecc75ed21908966d3421e9300657c698feb"
},
"downloads": -1,
"filename": "iterpop-0.4.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "c73e75ebca30d4e31171879d4e2f0fc9",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.5",
"size": 4169,
"upload_time": "2022-10-16T07:31:05",
"upload_time_iso_8601": "2022-10-16T07:31:05.973858Z",
"url": "https://files.pythonhosted.org/packages/ec/a2/b7e4fee1bb1749b8c7e27d520dd747fc16c920d0aadf6323324d88cb7a72/iterpop-0.4.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5772e4ebfe83d3cd70895e9c3eddd34dad7d01b7484de442d23d5cd66bd4935d",
"md5": "a91c6ed8183add986cd58e1952f4d3a2",
"sha256": "36d1a20a15b4c7afcd3db0a265dce0f5a6e0bbefb712f955667abbddd68fa471"
},
"downloads": -1,
"filename": "iterpop-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "a91c6ed8183add986cd58e1952f4d3a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 11175,
"upload_time": "2022-10-16T07:31:08",
"upload_time_iso_8601": "2022-10-16T07:31:08.119696Z",
"url": "https://files.pythonhosted.org/packages/57/72/e4ebfe83d3cd70895e9c3eddd34dad7d01b7484de442d23d5cd66bd4935d/iterpop-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-10-16 07:31:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mmore500",
"github_project": "iterpop",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "iterpop"
}