我以 Python 为例。
class ThingArguments:
def render(self, text, color):
return magiclibrary.generateText(text, color)
class ThingStates:
def __init__(self):
self.color = (0, 0, 0)
def render(self, text):
return magiclibrary.generateText(text, self.color)
def setColor(self, color):
self.color = color
哪个更适合 Python?对于任何语言,哪一种更可取?各有什么优势..?