Skip to content

Commit c763608

Browse files
author
rocky
committed
Improve docstring for r_object
1 parent 26832fe commit c763608

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

xdis/unmarshal.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,16 @@ def r_ref(self, obj, save_ref):
213213
return obj
214214

215215
# In marshal.c this is one big case statement
216+
# FIXME: remove bytes_fo_s parameter.
217+
# Now that we have git branches, isolated by Python version.
218+
# This is only needed in the Python 2.4 - 2.7 code branch.
216219
def r_object(self, bytes_for_s: bool = False):
217220
"""
218-
In Python3 strings are bytes type
221+
Main object unmarshalling read routine. Reads from self.fp
222+
the next byte which is a key in UNMARSHAL_DISPATCH_TABLE
223+
defined above when the high-order bit, FLAG_REF is not set.
224+
FLAG_REF indicates whether to save the resulting object in
225+
our internal object cache.
219226
"""
220227
byte1 = ord(self.fp.read(1))
221228

0 commit comments

Comments
 (0)