[Python-bugs-list] [ python-Bugs-595837 ] pickle_complex in copy_reg.py
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 15 Aug 2002 20:49:36 -0700
Bugs item #595837, was opened at 2002-08-15 23:28
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: Open
Resolution: None
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: Guido van Rossum (gvanrossum)
Date: 2002-08-15 23: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