jjzjj

PythonModule

全部标签

c# - 在 F# 中使用程序集属性

我正在尝试将以下构造IronPython模块的C#示例转换为F#。usingSystem;usingIronPython.Runtime;[assembly:PythonModule("my_module",typeof(MyModule))]publicstaticclassMyModule{publicstaticvoidhello_world(){Console.WriteLine("helloworld");}}使用PythonModule允许frommy_moduleimport*,等等。我无法弄清楚如何在F#中应用PythonModule属性。F#文档只讨论与模块相关的程序