Skip to main content

A extension enhancing Python loop.

Project description

LoopEx

A extension enhancing Python loop.

Usage

First, install package via pip.

pip install loopex@git+https://github.com/glyzinieh/python-loop-extension

Second, import module before the loop.

from loopex import LoopEx

Features

Now, one feature is available. We plan to add more features in the future.

do_while(condition)

This enables you to implement "do...while" in Python in a simple way. This is similar to the while statement, but the expression is tested after the suite is executed.

do_while = LoopEx().do_while
result = ''
i = 0

while do_while(i < 5):
    i += 1
    result += str(i)

print(result) # 12345

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loopex-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

loopex-0.0.1-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page