我遇到了几行与此类似的代码,但我不确定如何打破它:
blueprint = Blueprint(self.blueprint_map[str(self.ui.blueprint_combo.currentText())], runs=self.ui.runs_spin.text(), me=self.ui.me_spin.text(), pe=self.ui.pe_skill_combo.currentIndex())
提前致谢
答案 0 :(得分:14)
blueprint = Blueprint(
self.blueprint_map[str(self.ui.blueprint_combo.currentText())],
runs=self.ui.runs_spin.text(),
me=self.ui.me_spin.text(),
pe=self.ui.pe_skill_combo.currentIndex(),
)
答案 1 :(得分:5)
这个怎么样
blueprint_item = self.blueprint_map[str(self.ui.blueprint_combo.currentText())]
blueprint = Blueprint(blueprint_item,
runs=self.ui.runs_spin.text(),
me=self.ui.me_spin.text(),
pe=self.ui.pe_skill_combo.currentIndex())
答案 2 :(得分:4)
我这样做:
blueprint = Blueprint(
self.blueprint_map[str(self.ui.blueprint_combo.currentText())],
runs=self.ui.runs_spin.text(),
me=self.ui.me_spin.text(),
pe=self.ui.pe_skill_combo.currentIndex())
答案 3 :(得分:0)
括号内的任何地方都应该有效,例如:
blueprint = Blueprint(self.blueprint_map[str(self.ui.blueprint_combo.currentText())],
runs=self.ui.runs_spin.text(), me=self.ui.me_spin.text(),
pe=self.ui.pe_skill_combo.currentIndex())
答案 4 :(得分:0)
blueprint = Blueprint(self.blueprint_map[str(self.ui.blueprint_combo.currentText())],
runs=self.ui.runs_spin.text(), me=self.ui.me_spin.text(),
pe=self.ui.pe_skill_combo.currentIndex())