[IronPython] bug: Subclassing str fails

Anthony Tarlano mailinglist.account at gmail.com
Sun Feb 26 18:10:53 CET 2006


Subclassing str in IronPython fails, this behavior is different then
CPython. See the following:

------ CPython (success)

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class MyString(str):
...  pass
...
>>> s = MyString()
>>> s
''
>>>


------ IronPython (failure)


IronPython 1.0.2237 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> class MyString(str):
...  pass
...
>>> s = MyString()
Traceback (most recent call last):
  File , line 0, in input##572
  File , line 0, in Make##440
TypeError: MakeNew$$() takes exactly 2 argument (1 given)
>>>



More information about the Ironpython-users mailing list