[Python-bugs-list] [ python-Bugs-595837 ] pickle_complex in copy_reg.py
SourceForge.net
noreply@sourceforge.net
Sat, 07 Jun 2003 09:21:03 -0700
Bugs item #595837, was opened at 2002-08-16 03:28
Message generated for change (Comment added) made by arigo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595837&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Neal Norwitz (nnorwitz)
Summary: pickle_complex in copy_reg.py
Initial Comment:
This code is in copy_reg.py from 1997:
def pickle_complex(c):
return complex, (c.real, c.imag)
pickle(type(1j), pickle_complex, complex)
I'm not sure if the function pickle_complex() is
necessary, but it definitely seems that the line after
should be commented out or removed. pickle_complex()
is not in the doc either.
(I was building WITHOUT_COMPLEX and found this problem.)
----------------------------------------------------------------------
Comment By: Armin Rigo (arigo)
Date: 2003-06-07 16:21
Message:
Logged In: YES
user_id=4771
proposed patch #750595.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-08-20 19:44
Message:
Logged In: YES
user_id=6380
I'm rejecting this as invalid. Neal, if you disagree, just
reopen and assign to me.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-08-16 03:49
Message:
Logged In: YES
user_id=6380
Without that line you can't pickle complex numbers. Maybe it
should fail gracefully if complex doesn't exist. Feel free
to check in a fix for that.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595837&group_id=5470