Skip to main content

++ operator in python

Project description

requires python 3.6 or above.
tested in 3.8, 3.9 and 3.10

pip install -U incr

usage:

from incr import incr

@incr
def x():
    i = 0
    print(++i)  # 1
    print(i)    # 1

    ++i
    print(i)    # 2

post-increment (i++) is not supported because it's not a valid python syntax

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

incr-0.1.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

incr-0.1.1-py3-none-any.whl (5.1 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