Looks like this issue has been fixed in the coming beta4. Please wait for a few moments.

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of liangml
Sent: Wednesday, March 08, 2006 5:47 PM
To: [email protected]
Subject: [IronPython] Default parameters problem In IronPython 1.0

 

Hi all:

    It seems that IronPython has a limit about default parameters. Please see this below, I don't know

why the last tow tests work well, but the first one doesn't :(

 

IronPython 1.0.2255 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import System
>>> def foo(a,b,c,d=1,e=2): t=System.Text.Encoding.Default.GetBytes(c)
>>> foo("aaaa","bbbb","cccc")
Traceback (most recent call last):
  File , line 0, in input##1
  File , line 0, in foo
  File , line 0, in foo
Exception: Object reference not set to an instance of an object.
>>> def foo(a,b,c,d=1): t=System.Text.Encoding.Default.GetBytes(c)
>>> foo("aaaa","bbbb","cccc")
>>> def foo(c,d=1,e=2): t=System.Text.Encoding.Default.GetBytes(c)
>>> foo("cccc")
>>>

 

_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to