A better Python superset language.
Project description
MíngShé
A better Python superset language. Use Pegen to compile the code.
“鲜山多金玉,无草木,鲜水出焉,而北流注于伊水。其中多鸣蛇,其状如蛇而四翼,其音如磬,见则其邑大旱”——《山海经》
Install
pip install mingshe
Usage
As a script
Write the following code to hello.she
, and then run mingshe ./hello.she
.
"hello world" |> print
As a module
Just like use a python module, you can use a mingshe module.
# lib.she
def digit_sum(s: str) -> int:
return s |> map(int, ?) |> sum
# main.py
from lib import digit_sum
print(digit_sum('123456'))
Compile to python
Use mingshe --compile ...
to compile to Python code, and it can be compiled to the specified Python version: mingshe --compile --python 2.7 ...
.
Change log
Read releases to see the change log.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mingshe-0.7.1.tar.gz
(70.5 kB
view hashes)
Built Distribution
mingshe-0.7.1-py3-none-any.whl
(66.8 kB
view hashes)