File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 99 1
1010 >>> pickle1_ext.world.__name__
1111 'world'
12- >>> pickle1_ext.world('Hello').__reduce__()
12+ >>> # XXX: until python 3.10: 2-element tuple
13+ >>> # XXX: since python 3.11: 3-element tuple (object's state added)
14+ >>> # https://docs.python.org/3.11/library/pickle.html#object.__reduce__
15+ >>> pickle1_ext.world('Hello').__reduce__()[:2]
1316 (<class 'pickle1_ext.world'>, ('Hello',))
1417 >>> wd = pickle1_ext.world('California')
1518 >>> pstr = pickle.dumps(wd)
Original file line number Diff line number Diff line change 1212 1
1313 >>> pickle4_ext.world.__name__
1414 'world'
15- >>> pickle4_ext.world('Hello').__reduce__()
15+ >>> # XXX: until python 3.10: 2-element tuple
16+ >>> # XXX: since python 3.11: 3-element tuple (object's state added)
17+ >>> # https://docs.python.org/3.11/library/pickle.html#object.__reduce__
18+ >>> pickle4_ext.world('Hello').__reduce__()[:2]
1619 (<class 'pickle4_ext.world'>, ('Hello',))
1720 >>> wd = pickle4_ext.world('California')
1821 >>> pstr = pickle.dumps(wd)
You can’t perform that action at this time.
0 commit comments