【发布时间】:2015-08-12 19:19:02
【问题描述】:
我正在尝试定义一个表颜色,其中包含各种其他表,这些表包含表示颜色的元组。
title_label = [
text = (236, 218, 51),
background = (125, 142, 246)
],
start_button = [
text = (32, 40, 145),
background = (236, 235, 136),
pressed = (44, 51, 112)
],
quit_button = [
text = (166, 21, 13),
background = (48, 61, 188),
pressed = (31, 40, 129)
]
但是,这会产生无效的语法错误。这是为什么呢?
【问题讨论】:
-
你能告诉Minimal, Complete, and Verifiable example你想做什么吗?
-
列表不能有这样的标签。您是否阅读了the Python tutorial 以熟悉基本的 Python 数据结构?