mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
up
This commit is contained in:
parent
c2c7630320
commit
6bd05dede8
@ -24,26 +24,26 @@ print(primes)
|
|||||||
The following table shows the basic features of PocketPy with respect to [CPython](https://github.com/python/cpython).
|
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.
|
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 `**` | `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 |
|
||||||
| Slice | `a[1:2], a[:2], a[1:]` | YES |
|
| Tuple | `(1, 2, 'a')` | 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 |
|
| Star Unpacking | `a, *b = [1, 2, 3]` | NO |
|
||||||
| Star Unpacking | `a, *b = [1, 2, 3]` | NO |
|
| Exception | `raise/try..catch` | YES |
|
||||||
| Throw Exception | `assert/raise` | YES |
|
| Dynamic Code | `eval()/exec()` | YES |
|
||||||
| Catch Exception | `try..catch` | NO |
|
| Reflection | `hasattr()/getattr()/setattr()` | YES |
|
||||||
| Eval/Exec | `eval()/exec()` | YES |
|
| Import | `import/from..import` | YES |
|
||||||
| Import | `import/from..import` | YES |
|
| Context Block | `with <expr> as <id>:` | YES |
|
||||||
| Context Block | `with <expr> as <id>:` | YES |
|
| Type Annotation | `def f(a: int, b : float = 1)` | YES |
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit ae3cd03dfd04c5a9b3d9178ee9562d9d8c15db74
|
Subproject commit 2c358833fee58406c777d02c80e540e9b6030367
|
Loading…
x
Reference in New Issue
Block a user