mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
some fix
This commit is contained in:
parent
1cf67220f8
commit
21e5122c44
@ -60,11 +60,10 @@ assert next(a) == 1
|
||||
|
||||
try:
|
||||
next(a)
|
||||
exit(1)
|
||||
except StopIteration:
|
||||
pass
|
||||
print("a is exhausted")
|
||||
```
|
||||
|
||||
!!!
|
||||
Do not change `builtins.next`. It will break some internal functions which rely on `StopIteration` as return value.
|
||||
Do not change `builtins.next`. It will break internal functions which rely on `StopIteration` as return value.
|
||||
!!!
|
@ -119,7 +119,7 @@ StackOverflowError
|
||||
String compilation has no guarantee of compatibility between different versions of pkpy.
|
||||
!!!
|
||||
|
||||
You can use this snnipet to convert every python file in a directory into precompiled strings:
|
||||
You can use this snnipet to convert every python file in a directory into precompiled strings.
|
||||
|
||||
```python
|
||||
# precompile.py
|
||||
@ -127,6 +127,7 @@ import sys, os
|
||||
|
||||
def precompile(filepath: str):
|
||||
"""Precompile a python file inplace"""
|
||||
print(filepath)
|
||||
with open(filepath, 'r') as f:
|
||||
source = f.read()
|
||||
source = compile(source, filepath, 'exec')
|
||||
|
@ -3,7 +3,7 @@ output: .retype
|
||||
url: https://pocketpy.dev
|
||||
branding:
|
||||
title: pocketpy
|
||||
label: v1.4.4
|
||||
label: v1.4.5
|
||||
logo: "./static/logo.png"
|
||||
favicon: "./static/logo.png"
|
||||
meta:
|
||||
|
Loading…
x
Reference in New Issue
Block a user