Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
duolabmeng6 committed Jul 29, 2022
1 parent c6e0b7c commit 20daf2b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyefun/核心易函数支持库/json函数.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ def json到文本(data, html编码=True, ascii编码=False, 斜杠转义=True,
def json加载(data):
ujson = _动态导包("ujson")
return ujson.loads(data)

14 changes: 14 additions & 0 deletions pyefun/补丁/ujson补丁.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
直接把 json 对象替换为 ujson
"""
import json
import ujson


def 补丁json():
json.__name__ = 'ujson'
json.dumps = ujson.dumps
json.loads = ujson.loads


补丁json()
1 change: 1 addition & 0 deletions pyefun/调试/调试输出.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
try:
from icecream import ic
except ImportError: # Graceful fallback if IceCream isn't installed.
print("ic 调试需要安装 pip install icecream")
ic = lambda *a: None if not a else (a[0] if len(a) == 1 else a) # noqa

0 comments on commit 20daf2b

Please sign in to comment.