[IronPython] Default-valued arguments to C# functions

Jeff Hardy jdhardy at gmail.com
Sat Apr 24 01:57:57 CEST 2010

I've got some functions implemented in C# that need to have optional,
defaulted parameters. So far I've been declaring them similar to:

    public object cursor(CodeContext context,
[Optional][DefaultValue(null)]object factory)

However, if factory is not specified, instead of being set to null,
it's a System.Reflection.Missing instance. Removing the DefaultValue
or changing the order doesn't change the outcome. Is this expected

- Jeff

More information about the Ironpython-users mailing list