[Python-bugs-list] [ python-Bugs-533291 ] __reduce__ does not work as documented
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 22 Mar 2002 07:10:31 -0800
Bugs item #533291, was opened at 2002-03-21 20:47
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=533291&group_id=5470
Category: Python Library
Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Neil Schemenauer (nascheme)
Assigned to: Guido van Rossum (gvanrossum)
Summary: __reduce__ does not work as documented
Initial Comment:
The documentation for __reduce__ says that the second
element of the returned tuple can either be a tuple
of arguments or None. The copy module does not handle
the None case:
class C(object):
def __reduce__(self):
return (C, None)
import copy
copy.copy(C())
----------------------------------------------------------------------
>Comment By: Neil Schemenauer (nascheme)
Date: 2002-03-22 15:10
Message:
Logged In: YES
user_id=35752
Added trivial patch to fix copy.py module.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=533291&group_id=5470