semvec/pypi-packages huggingface dataset:
iterify 0.1.0
iterify streamlines making one-off iterators over one or a few values
License: MIT license
Requires Python: >=3.6
Keywords: iterify

============
iterify
============


.. image:: https://img.shields.io/pypi/v/iterify.svg
        :target: https://pypi.python.org/pypi/iterify

.. image:: https://img.shields.io/travis/mmore500/iterify.svg
        :target: https://travis-ci.com/mmore500/iterify

.. image:: https://readthedocs.org/projects/iterify/badge/?version=latest
        :target: https://iterify.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status




iterify streamlines making one-off iterators over one or a few values


* Free software: MIT license
* Documentation: https://iterify.readthedocs.io.


.. code-block:: python3

  import iterify as itfy



  # itfy.iterify
  [*itfy.iterify('a')] # -> ['a']

  [*itfy.iterify('a', 'b', 'c')] # -> ['a', 'b', 'c']


  # itfy.cyclify
  [*zip([1, 2, 3], itfy.cyclify('a', 'b'))] # -> [(1, 'a'), (2, 'b'), (3, 'a')]


  # itfy.samplify
  [*zip(
    [1, 2, 3],
    itfy.samplify('a', 'b')
  )]
  # -> [(1, 'a'), (2, 'a'), (3, 'b')]
  # or -> [(1, 'b'), (2, 'a'), (3, 'b')]
  # or -> [(1, 'b'), (2, 'b'), (3, 'b')]
  # etc.


  # itfy.shufflify
  [*itfy.shufflify('a', 'b')]
  # -> ['a', 'b']
  # or -> ['b', 'a']

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.0.0 (2022-02-22)
------------------

* First release on PyPI.
yydemo 0.0.1
a short descrip
License: MIT license
Requires Python: >=3.5
Keywords: yydemo

# yydemo


[![image](https://img.shields.io/pypi/v/yydemo.svg)](https://pypi.python.org/pypi/yydemo)


**a short descrip**


-   Free software: MIT license
-   Documentation: https://liyangyang515.github.io/yydemo
    

## Features

-   TODO

## Credits

This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) and the [giswqs/pypackage](https://github.com/giswqs/pypackage) project template.
opytional 0.1.0
opytional makes working with values that might be None safer and easier
License: MIT license
Requires Python: >=3.6
Keywords: opytional

============
opytional
============


.. image:: https://img.shields.io/pypi/v/opytional.svg
        :target: https://pypi.python.org/pypi/opytional

.. image:: https://img.shields.io/travis/mmore500/opytional.svg
        :target: https://travis-ci.com/mmore500/opytional

.. image:: https://readthedocs.org/projects/opytional/badge/?version=latest
        :target: https://opytional.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status




opytional makes working with values that might be None safer and easier


* Free software: MIT license
* Documentation: https://opytional.readthedocs.io.


Inspired by C++'s :code:`std::optional`.


.. code-block:: python3

  import opytional as opyt



  # opyt.or_value
  # provides a fallback value when value is None

  opyt.or_value(None, 'fallback') # returns 'fallback'

  opyt.or_value('value', 'fallback') # returns 'value'



  # opyt.or_else
  # provides a fallback callable when value is None

  opyt.or_else(None, lambda: 'fallback') # returns 'fallback'

  opyt.or_else('value', lambda: 'fallback') # returns 'value'



  # opyt.apply_if
  # applies an operator to value when value is not None

  opyt.apply_if(None, lambda x: x + ' world') # returns None

  opyt.apply_if('hello', lambda x: x + ' world') # returns 'hello world'



  # opyt.apply_if_or_value
  # applies an operator to value when value is not None
  # with a fallback value for when value is None

  opyt.apply_if_or_value(None, lambda x: x + ' world', 'fallback')
  # returns 'fallback'

  opyt.apply_if_or_value('hello', lambda x: x + ' world', 'fallback')
  # returns 'hello world'

  opyt.apply_if_or_value('hello', lambda x: None, 'fallback') # returns None



  # opyt.apply_if_or_else
  # applies an operator to value when value is not None
  # with a fallback callable for when value is None

  opyt.apply_if_or_else(None, lambda x: x + ' world', lambda: 'fallback')
  # returns 'fallback'

  opyt.apply_if_or_value('hello', lambda x: x + ' world', lambda: 'fallback')
  # returns 'hello world'

  opyt.apply_if_or_value('hello', lambda x: None, lambda: 'fallback')
  # returns None


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 (2022-02-22)
------------------

* First release on PyPI.