Skip to main content

Package for adding type information to python

Project description

lpython

https://lpython.org/

This is a python package to add typing information to python code. Use LPython to compile it.

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-0.0.16.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lpython-0.0.16.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file lpython-0.0.16.0.tar.gz.

File metadata

  • Download URL: lpython-0.0.16.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for lpython-0.0.16.0.tar.gz
Algorithm Hash digest
SHA256 34f02b52d1e10255914107d2e6c9ec3b1025543441e894475e0a5228b9d2e1cd
MD5 e290f7c40173ad413e3023a9e403374c
BLAKE2b-256 2234c20587a9589a9e2912f5909465e77b3eb9186015bd7a789e460b54cf7fbd

See more details on using hashes here.

File details

Details for the file lpython-0.0.16.0-py3-none-any.whl.

File metadata

  • Download URL: lpython-0.0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for lpython-0.0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f47380ea372b615b1a34ac380a8eb2930e9018b047fbff78f1b38b74cd3de52
MD5 5e8e9b50990279947f118bdf3d1cbd24
BLAKE2b-256 97ace342ac8b2ed2c7b6bde8197295d9238475e1cef8607c712e388ff50e7bb6

See more details on using hashes here.

Supported by

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