Skip to content

Commit 2b93c4c

Browse files
committed
Updated the INST/OBJ docs, to say they really are (almost) identical
in 2.3.
1 parent d01c1e9 commit 2b93c4c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

β€ŽLib/pickletools.pyβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,8 @@ def __init__(self, name, code, arg,
16141614
the class object obtained from INST's arguments is applied to the
16151615
argtuple obtained from the stack, and the resulting instance object
16161616
is pushed on the stack.
1617+
1618+
NOTE: checks for __safe_for_unpickling__ went away in Python 2.3.
16171619
"""),
16181620

16191621
I(name='OBJ',
@@ -1643,6 +1645,10 @@ def __init__(self, name, code, arg,
16431645
except that no __safe_for_unpickling__ check is done (XXX this is
16441646
a bug; cPickle does test __safe_for_unpickling__). See INST for
16451647
the gory details.
1648+
1649+
NOTE: In Python 2.3, INST and OBJ are identical except for how they
1650+
get the class object. That was always the intent; the implementations
1651+
had diverged for accidental reasons.
16461652
"""),
16471653

16481654
I(name='NEWOBJ',

0 commit comments

Comments
 (0)