Skip to main content

Package for adding type information to python

Project description

lpython_emulation

This is a python package to add typing information to python code.

Example

from lpython import i32, f64

def add(a: i32, b: i32) -> i32:
    return a + b

def area_of_circle(radius: f64) -> f64:
    pi: f64 = 3.14
    return pi * (radius * radius)

def main0():
    print("The sum of 5 and 3 is", end=" ")
    print(add(5, 3))
    print("Area of circle with radius 5.0 is", end=" ")
    print(area_of_circle(5.0))

main0()
$ python main.py
The sum of 5 and 3 is 8
Area of circle with radius 5.0 is 78.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

lpython_emulation-0.0.16.0.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

lpython_emulation-0.0.16.0-py3-none-any.whl (10.2 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