Skip to main content

Add not pythonic syntax into your python.

Project description

hdytto: How do you turn this on

A library adding new syntax into your Python. i.e. It is NOT Pythonic :)

Compatibility

  • Python >=3.8

Usage

At first, make sitecustomize.py:

from hdytto import register_hdytto
register_hdytto()

Set the environmental variable PYTHONPATH the path to the directory containing the sitecustomize.py. Then, run main.py:

# coding: hdytto

a = 5
print(a++)
print(a)

The output will be

5
6

API

Increment / Decrement

Syntax

x++
++x
x--
--x

Example

# coding: hdytto
a = 5
print(a++)
print(++a)
b = 10 - --a
print(b--)

Output:

5
7
4

do...while

Syntax

do:
    statement
    while condition

Example

# coding: hdytto
do:
    a = 5
    while a < 3
do:
    b = a * 2
    while a++ < 10:
        pass
    while b <= 20
print(b)

Output:

22

Comment

Syntax

/* */

Example

# coding: hdytto
a = /* foo */ 10
print(a)
if a == 10:
    b = 5
    /*b = 10
print(a - 20)*/
print(b)

Output:

10
5

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

hdytto-0.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

hdytto-0.1-py3-none-any.whl (6.3 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