任何打字稿专家都可以澄清在使用Typescript时何时以及为什么选择AMD vs Common JS进行模块创建?
在Python类中,我有以下方法
def foo(self,arg1, arg2):
global run
run = False
Run Code Online (Sandbox Code Playgroud)
在同一个类中,在我的构造函数中
while run:
sleep(0.01)
self.each_frame()
self.server.close()
run = True
Run Code Online (Sandbox Code Playgroud)
以这种方式在类方法中精细化全局变量是否可以?