【发布时间】:2015-12-04 17:49:40
【问题描述】:
我在互联网上搜索并找不到解决方案。请帮忙。 比方说……
class A(self):
def __init__ (self):
"""one chunk of code here"""
if (condition met):
print 'access granted'
"""I want to stop the code here and ask it to run class B, instead of just one method from class B"""
else:
print 'Stop process'
break
class B(self):
def __init__ (self):
"""one more chunk of codes here"""
这可能吗? (原谅我乱七八糟的代码)
【问题讨论】:
-
你没有“运行”一堂课。你运行函数。
-
好像是 XY 问题,你打算怎么做?