<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all:</FONT></DIV>
<DIV><FONT face=Arial size=2> It seems that IronPython has a
limit about default parameters. Please see this below, I don't
know</FONT></DIV>
<DIV><FONT face=Arial size=2>why the last tow tests work well, but the first one
doesn't :(</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT color=#0000ff>IronPython 1.0.2255 (Beta) on .NET
2.0.50727.42<BR>Copyright (c) Microsoft Corporation. All rights
reserved.<BR>>>> import System<BR>>>> def foo(a,b,c,d=1,e=2):
t=System.Text.Encoding.Default.GetBytes(c)<BR>>>>
foo("aaaa","bbbb","cccc")<BR>Traceback (most recent call last):<BR> File ,
line 0, in input##1<BR> File , line 0, in foo<BR> File , line 0, in
foo<BR>Exception: Object reference not set to an instance of an
object.<BR>>>> def foo(a,b,c,d=1):
t=System.Text.Encoding.Default.GetBytes(c)<BR>>>>
foo("aaaa","bbbb","cccc")<BR>>>> def foo(c,d=1,e=2):
t=System.Text.Encoding.Default.GetBytes(c)<BR>>>>
foo("cccc")<BR>>>></FONT></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV></DIV></BODY></HTML>