我遇到了几行与此类似的代码,但我不确定应该如何破解它:
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())
提前致谢
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(),
)
这个怎么样
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())
我会这样做:
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())
括号内的任何地方都应该工作,例如:
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())
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())