Skip to content

Commit 017b479

Browse files
committed
feat: port to 3.14
1 parent cb70cf1 commit 017b479

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

README-zh-cn.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python 标准库速查表
22

3-
依赖 Python v3.13.7
3+
依赖 Python v3.14.0
44

55
所有代码片段都经过测试确保可以正常运行
66

@@ -222,7 +222,7 @@
222222
... HtmlDiff = d.make_file(text1_lines, text2_lines) # make it a html file
223223
... f.write(HtmlDiff)
224224
...
225-
3391
225+
3739
226226
```
227227

228228
#### SequenceMatcher
@@ -279,7 +279,7 @@ Match(a=1, b=0, size=4)
279279
>>> unicodedata.name("(") # reverse to lookup
280280
'LEFT PARENTHESIS'
281281
>>> unicodedata.unidata_version
282-
'15.1.0'
282+
'16.0.0'
283283
```
284284

285285
## readline
@@ -867,7 +867,7 @@ cmp1.txt | Line Number: 5 |: 5
867867
... [2, "second"]]
868868
>>> dumps = pickle.dumps(data) # similar to json module
869869
>>> dumps
870-
b'\x80\x04\x95"\x00\x00\x00\x00\x00\x00\x00]\x94(]\x94(K\x01\x8c\x05first\x94e]\x94(K\x02\x8c\x06second\x94ee.'
870+
b'\x80\x05\x95"\x00\x00\x00\x00\x00\x00\x00]\x94(]\x94(K\x01\x8c\x05first\x94e]\x94(K\x02\x8c\x06second\x94ee.'
871871
>>> pickle.loads(dumps)
872872
[[1, 'first'], [2, 'second']]
873873
```
@@ -1724,10 +1724,11 @@ True
17241724
1 RESUME 0
17251725

17261726
2 LOAD_GLOBAL 1 (print + NULL)
1727-
LOAD_CONST 1 ('Hello World')
1727+
LOAD_CONST 0 ('Hello World')
17281728
CALL 1
17291729
POP_TOP
1730-
RETURN_CONST 0 (None)
1730+
LOAD_CONST 1 (None)
1731+
RETURN_VALUE
17311732
>>> dis.show_code(func)
17321733
Name: func
17331734
Filename: <stdin>

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python Standard Libraries Cheatsheet
22

3-
Depend on Python v3.13.7
3+
Depend on Python v3.14.0
44

55
All code snippets have been tested to ensure they work properly.
66

@@ -223,7 +223,7 @@ Fork me on [GitHub](https://github.com/pynickle/python-cheatsheet-redefined).
223223
... HtmlDiff = d.make_file(text1_lines, text2_lines) # make it a html file
224224
... f.write(HtmlDiff)
225225
...
226-
3391
226+
3739
227227
```
228228

229229
#### SequenceMatcher
@@ -280,7 +280,7 @@ Match(a=1, b=0, size=4)
280280
>>> unicodedata.name("(") # reverse to lookup
281281
'LEFT PARENTHESIS'
282282
>>> unicodedata.unidata_version
283-
'15.1.0'
283+
'16.0.0'
284284
```
285285

286286
## readline
@@ -868,7 +868,7 @@ cmp1.txt | Line Number: 5 |: 5
868868
... [2, "second"]]
869869
>>> dumps = pickle.dumps(data) # similar to json module
870870
>>> dumps
871-
b'\x80\x04\x95"\x00\x00\x00\x00\x00\x00\x00]\x94(]\x94(K\x01\x8c\x05first\x94e]\x94(K\x02\x8c\x06second\x94ee.'
871+
b'\x80\x05\x95"\x00\x00\x00\x00\x00\x00\x00]\x94(]\x94(K\x01\x8c\x05first\x94e]\x94(K\x02\x8c\x06second\x94ee.'
872872
>>> pickle.loads(dumps)
873873
[[1, 'first'], [2, 'second']]
874874
```
@@ -1725,10 +1725,11 @@ True
17251725
1 RESUME 0
17261726

17271727
2 LOAD_GLOBAL 1 (print + NULL)
1728-
LOAD_CONST 1 ('Hello World')
1728+
LOAD_CONST 0 ('Hello World')
17291729
CALL 1
17301730
POP_TOP
1731-
RETURN_CONST 0 (None)
1731+
LOAD_CONST 1 (None)
1732+
RETURN_VALUE
17321733
>>> dis.show_code(func)
17331734
Name: func
17341735
Filename: <stdin>

0 commit comments

Comments
 (0)