[IronPython] an unexpected keyword argument

HEMMI, Shigeru textdirected at gmail.com
Thu Aug 31 03:51:28 CEST 2006


Hello, for a code,

class TEST(file):
    def __init__(self,fname,VERBOSITY=0):
        file.__init__(self,fname,"r",1)
        self.VERBOSITY = VERBOSITY
if __name__=='__main__':
    f=TEST(r'sometext.txt',VERBOSITY=1)
    print "f.VERBOSITY=",f.VERBOSITY

I got different result:

C:\home\>ipy testIPY.py
Traceback (most recent call last):
  File C:\cygwin\home\c1544\crcsolver\magna_examples\testIPY.py, line 6, in Init
ialize
TypeError: __new__() got an unexpected keyword argument 'VERBOSITY'

C:home\>python testIPY.py
f.VERBOSITY= 1



More information about the Ironpython-users mailing list