如何使用装饰器?

2024-10-03 19:28:08 发布

您现在位置:Python中文网/ 问答频道 /正文

在SharpDevelop中,我想创建一个包含静态方法void Main(string[]args)的dll。在

有人说我应该使用decorator来限制IronPython中的函数。在

我找到了“@staticmethod”,但其他的“void”、“string[]args”,如何限制它们?在

class MyClass:
    def __init__(self):
        pass
    @staticmethod   
    def Main(args):
        pass    

Tags: 函数stringinitmaindefmyclassargsdecorator