Skip to content

Commit 1ae8ae3

Browse files
author
rocky
committed
Add more bytecode
1 parent 7f2ef50 commit 1ae8ae3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/bytecode_3.4/03_big_dict.pyc

5.19 KB
Binary file not shown.

xdis/marsh.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def dump(self, x, flag_ref: int = 0) -> None:
135135
raise ValueError("unmarshallable object")
136136
func(self, x)
137137

138+
# FIXME: Handle interned versions of dump_ascii, dump_short_ascii
138139
def dump_ascii(self, path: str) -> None:
139140
self._write(TYPE_ASCII)
140141
self.w_long(len(path))
@@ -462,6 +463,14 @@ def dump_int(self, value: int, flag_ref: int = 0) -> None:
462463

463464
dispatch[int] = dump_int
464465

466+
def dump_list(self, x) -> None:
467+
self._write(TYPE_LIST)
468+
self.w_long(len(x))
469+
for item in x:
470+
self.dump(item)
471+
472+
dispatch[list] = dump_list
473+
465474
def dump_long(self, x) -> None:
466475
self._write(TYPE_LONG)
467476
sign = 1
@@ -603,15 +612,6 @@ def dump_unicode(self, s, flag_ref: int = 0) -> None:
603612
else:
604613
dispatch[unicode] = dump_unicode # noqa
605614

606-
def dump_list(self, x) -> None:
607-
self._write(TYPE_LIST)
608-
self.w_long(len(x))
609-
for item in x:
610-
self.dump(item)
611-
612-
dispatch[list] = dump_list
613-
614-
# FIXME: Handle interned versions of dump_ascii, dump_short_ascii
615615

616616

617617
class _NULL:

0 commit comments

Comments
 (0)