mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
up
This commit is contained in:
parent
7840ae3ce0
commit
609d7e68d8
12
README.md
12
README.md
@ -1,14 +1,16 @@
|
|||||||
# pocketpy
|
# pocketpy
|
||||||
|
|
||||||

|
<p>
|
||||||
|
<a title="Build" href="https://github.com/blueloveTH/pocketpy/actions/workflows" ><img src="https://github.com/blueloveTH/pocketpy/actions/workflows/main.yml/badge.svg" /></a>
|
||||||
|
<a title="Pub" href="https://pub.dev/packages/pocketpy" ><img src="https://img.shields.io/pub/v/pocketpy" /></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
C++17 single-file header-only cross platform Python Interpreter.
|
C++17 header-only Python interpreter for game engines.
|
||||||
|
|
||||||
|
Please see https://pocketpy.dev for detailed documentations.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Documentations
|
|
||||||
See https://pocketpy.dev
|
|
||||||
|
|
||||||
|
|
||||||
## Build From Source (Linux)
|
## Build From Source (Linux)
|
||||||
|
|
||||||
|
@ -3,18 +3,22 @@
|
|||||||
PocketPy is a lightweight Python interpreter for game engines.
|
PocketPy is a lightweight Python interpreter for game engines.
|
||||||
|
|
||||||

|

|
||||||
|
# Basic Features
|
||||||
|
|
||||||
## Features
|
The following table shows the basic features of PocketPy with respect to [CPython](https://github.com/python/cpython).
|
||||||
|
The features marked with `YES` are supported, and the features marked with `NO` are not supported.
|
||||||
|
|
||||||
| Name | Example | Supported |
|
| Name | Example | Supported |
|
||||||
| --------------- | -------------------------- | --------- |
|
| --------------- | -------------------------- | --------- |
|
||||||
| If Else | `if..else..elif` | YES |
|
| If Else | `if..else..elif` | YES |
|
||||||
| Loop | `for/while/break/continue` | YES |
|
| Loop | `for/while/break/continue` | YES |
|
||||||
| Function | `def f(x,*args,y=1):` | YES |
|
| Function | `def f(x,*args,y=1):` | YES |
|
||||||
| Function KwArgs | `def f(**kwargs):` | NO |
|
| Function `**` | `def f(**kwargs):` | NO |
|
||||||
| Subclass | `class A(B):` | YES |
|
| Subclass | `class A(B):` | YES |
|
||||||
| List | `[1, 2, 'a']` | YES |
|
| List | `[1, 2, 'a']` | YES |
|
||||||
| ListComp | `[i for i in range(5)]` | YES |
|
| ListComp | `[i for i in range(5)]` | YES |
|
||||||
|
| Slice | `a[1:2], a[:2], a[1:]` | YES |
|
||||||
|
| Tuple | `(1, 2, 'a')` | YES |
|
||||||
| Dict | `{'a': 1, 'b': 2}` | YES |
|
| Dict | `{'a': 1, 'b': 2}` | YES |
|
||||||
| F-String | `f'value is {x}'` | YES |
|
| F-String | `f'value is {x}'` | YES |
|
||||||
| Unpacking | `a, b = 1, 2` | YES |
|
| Unpacking | `a, b = 1, 2` | YES |
|
||||||
@ -25,11 +29,6 @@ PocketPy is a lightweight Python interpreter for game engines.
|
|||||||
| Import | `import/from..import` | YES |
|
| Import | `import/from..import` | YES |
|
||||||
| Context Block | `with <expr> as <id>:` | YES |
|
| Context Block | `with <expr> as <id>:` | YES |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Extra Features
|
|
||||||
|
|
||||||
For features that are PocketPy specific, see [Extra Features](https://pocketpy.dev/extras/goto).
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -204,3 +203,4 @@ class _MyAppState extends State<MyApp> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user