main icon indicating copy to clipboard operation
main copied to clipboard

copy_reg.constructor(old_style_class) should throw

Open ironpythonbot opened this issue 9 years ago • 0 comments

E:\vslrgrs\Merlin\Main\Languages\IronPython\Tests>26
Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

class testclass:
... pass
...
import copy_reg
copy_reg.constructor(testclass)
Traceback (most recent call last):
File "", line 1, in
File "E:\vslrgrs\Merlin\External.LCA_RESTRICTED\Languages\IronPython\26\lib\co py_reg.py", line 29, in constructor

raise TypeError("constructors must be callable")

TypeError: constructors must be callable

^Z

E:\vslrgrs\Merlin\Main\Languages\IronPython\Tests>25
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
class testclass:
... pass
...
import copy_reg
copy_reg.constructor(testclass)
^Z

E:\vslrgrs\Merlin\Main\Languages\IronPython\Tests>ipyd
IronPython 2.6 Alpha DEBUG (2.6.0.1) on .NET 2.0.50727.3053
Type "help", "copyright", "credits" or "license" for more information.
class testclass:
... pass
...
import copy_reg
copy_reg.constructor(testclass)

Work Item Details

Original CodePlex Issue: Issue 21907 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Apr 2, 2009 at 6:40 PM Reported by: dfugate Updated on: Feb 22, 2013 at 2:13 AM Updated by: jdhardy Test: test_copy_reg.py (test_constructor)

ironpythonbot avatar Dec 09 '14 17:12 ironpythonbot