¥È¥Ã¥× º¹Ê¬ °ìÍ÷ ¥½¡¼¥¹ ¸¡º÷ ¥Ø¥ë¥× PDF RSS ¥í¥°¥¤¥ó

IronPython ¤Ç Python ¤Î List ¤ò C# ¤ËÇÛÎó¤È¤·¤ÆÅϤ¹¤Ë¤Ï

[¥³¥ó¥Ô¥å¡¼¥¿]

¸½¾Ý

  • IronPython ¤«¤é¡¢List ¤ò C# ¤Î Array(double[]) °ú¿ô¤Î´Ø¿ô¤ËÅϤ½¤¦¤È¤¹¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬È¯À¸¤¹¤ë
expected Array[float], got list
  • C# ¦¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹
public static void Foo(double[] bar)
{
  • IronPython ¤«¤é¤Î¸Æ¤Ó½Ð¤·
data = [ 1.0 , 2.0 , 3.0 ]
MyClass.Foo(data)

Âнè

  • Python ¦¤Ç¡¢tuple ¤ËÊÑ´¹¤·¤Æ¤ä¤ë¤È¤è¤¤¡£
data = [ 1.0 , 2.0 , 3.0 ]
MyClass.Foo(tuple(data))

»²¹Í¥Ú¡¼¥¸

http://lists.ironpython.com/pipermail/users-ironpython.com/2006-June/002695.html

¡¡¥«¥Æ¥´¥ê¡¡¡§¡¡¤â¤¯¤·¤¤¡Ã¥²¡¼¥à¡Ã¥ì¥·¥Ô¡Ã¥³¥ó¥Ô¥å¡¼¥¿¡Ã»¨Ê¸¡ÃÀ¸³è¡ÃÅŻҹ©ºî¡Ã¤ª¤¤¤·¤¤Å¹¥Þ¥Ã¥×

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Top¥Ú¡¼¥¸¤Ø¡¡|¡¡¤â¤Æ¤Ê¤¤SNS¡Ö¤â¤¯¤·¤¤¡×