mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
get rid of 2.6/3.0 switch statements in multiprocessing
This commit is contained in:
parent
b09c9396cd
commit
264800822a
2 changed files with 6 additions and 23 deletions
|
@ -41,11 +41,6 @@ def reduce_array(a):
|
|||
copy_reg.pickle(array.array, reduce_array)
|
||||
|
||||
view_types = [type(getattr({}, name)()) for name in ('items','keys','values')]
|
||||
if view_types[0] is not list: # XXX only needed in Py3.0
|
||||
def rebuild_as_list(obj):
|
||||
return list, (list(obj),)
|
||||
for view_type in view_types:
|
||||
copy_reg.pickle(view_type, rebuild_as_list)
|
||||
|
||||
#
|
||||
# Type for identifying shared objects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue