[Python-bugs-list] [ python-Bugs-533291 ] __reduce__ does not work as documented
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 21 Mar 2002 12:47:05 -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())
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=533291&group_id=5470