Is it possible to use named and optional arguments in ironpython

I hope to download .net dll in ironpython.

But one of the static functions in the .net dll has some Named and optional arguments.

like, Draw (weight: w, height: h, Area = 1)

Only can I use the full arguments?

+3
source share
2 answers

Named and optional parameters are fully supported..NET has long supported VB.NET support, and therefore IronPython has supported the same way of doing this from the very beginning. The new C # syntax maps to the same basic metadata as the old VB support.

f (x = 42), Python. . Draw (, ) Area out. / .

.NET, IronPython, OptionalAttribute, DefaultParameterValueAttribute. (T), , Missing.Value. , API.

+6

SO , .NET IronPython ( , ).

, ,

, , Missing.Value .

, , from System.Reflection import Missing.

0

Source: https://habr.com/ru/post/1757598/


All Articles